.TH "globus_xio_udp_driver_io" 3 "Tue Jul 5 2022" "Version 6.6" "globus_xio" \" -*- nroff -*- .ad l .nh .SH NAME globus_xio_udp_driver_io \- Reading/Writing .PP \- Reading/Writing\&. .SH SYNOPSIS .br .PP .SH "Detailed Description" .PP Reading/Writing\&. \fBglobus_xio_register_read()\fP semantics: .PP If the waitforbytes parameter is greater than zero, the read will happen asynchronously and be completed when at least waitforbytes has been read/written\&. .PP If the waitforbytes parameter is equal to zero, one of the following alternative behaviors occur: .PP 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\&. .PP 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()\&. .PP 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\&. .PP 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 \fBGLOBUS_XIO_UDP_GET_CONTACT\fP or pass the data descriptor directly to \fBglobus_xio_register_write()\fP to send a message back to the sender\&. .PP 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 isn't overwritten by multiple packets from different senders\&. .PP \fBglobus_xio_register_write()\fP semantics: .PP 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 \fBGLOBUS_XIO_UDP_ERROR_SHORT_WRITE\fP error will be returned with nbytes set to the number of bytes actually sent\&. .PP If the handle is not 'connected', a contact string must be set in the data descriptor to \fBglobus_xio_register_write()\fP\&. This can either be done explicitly with \fBGLOBUS_XIO_UDP_SET_CONTACT\fP or implicitly by passing in a data descriptor received from \fBglobus_xio_register_read()\fP\&. .PP The udp write semantics are always synchronous\&. No blocking or internal callback will occur when using \fBglobus_xio_write()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for globus_xio from the source code\&.