Globus_xio_register_read() semantics: if the waitforbytes parameter is greater than zero, the read will happen asynchronously and be completed when at least waitforbytes has been read/written. if the waitforbytes parameter is equal to zero, one of the following alternative behaviors occur: if the length of the buffer is 0 the read happens synchronously. if the user is using one of the blocking xio calls, no internal callback will occur. if the length of the buffer is also 0, the call behaves like an asynchronous notification of data ready to be read. ie, an asynchronous select(). in any case, when an error occurs before the waitforbytes request has been met, the outgoing nbytes is set to the amount of data actually read before the error occurred. if the handle is not connected, the user should pass in a data descriptor. after the read, this data_descriptor will contain the contact string of the sender. the user can either get this contact string with globus_xio_udp_get_contact or pass the data descriptor directly to globus_xio_register_write() to send a message back to the sender. also, if the handle is not connected, the waitforbytes should probably be 1 to guarantee that only one packet is received and the sender contact isnt overwritten by multiple packets from different senders. globus_xio_register_write() semantics: when performing a write, exactly one udp packet is sent of the entire buffer length. the waitforbytes parameter is ignored. if the entire buffer can not be written, a globus_xio_udp_error_short_write error will be returned with nbytes set to the number of bytes actually sent. if the handle is not 'connected', a contact string must be set in the data descriptor to globus_xio_register_write(). this can either be done explicitly with globus_xio_udp_set_contact or implicitly by passing in a data descriptor received from globus_xio_register_read(). the udp write semantics are always synchronous. no blocking or internal callback will occur when using globus_xio_write().
Generated automatically by Doxygen for globus_xio from the source code.