GLOBUS_XIO_UDP_DRIVER_IO(3)
π globus_xio_udp_driver_io π
Library Functions Manual Β· this is the tea on globus_xio_udp_driver_io, bestie π«Ά
β¨ NAME β¨
globus_xio_udp_driver_io β Reading/Writing π
- Reading/Writing.
β¨ SYNOPSIS β¨
okay so, no cap, this page doesn't hand you a cute little synopsis block to copy-paste π the actual lore lives down in the description, so scroll, babe π
πΈ DETAILED DESCRIPTION πΈ
Reading/Writing. That's the whole vibe, and here's how it actually goes down π
π¦ 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 β pick your fighter:
- 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(). it's giving "ping me when there's something to read" energy π
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. π (so you always know how much you actually got, periodt)
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. π (yes bestie, you can just reply to the sender, iconic)
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. π¨ like fr fr, set it to 1 or risk your sender info getting clobbered π
π¦ 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(). π
π AUTHOR π
Generated automatically by Doxygen for globus_xio from the source code. π€ (not me writing my own bio, the robot did it)
and that's the whole page, bestie π this one's brought to you by globus_xio, Version 6.6 β go forth and slay those UDP packets, ily, bye π«Άβ¨ππ¦
π¦ where this page comes from
- epel 10: globus-xio-doc 6.6-4.el10_0 Β· Apache-2.0
- fedora 43: globus-xio-doc 6.6-9.fc43 Β· Apache-2.0
- fedora 44: globus-xio-doc 6.6-10.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-xio-doc 6.6-3build2 Β· Apache-2.0
- ubuntu stonking: libglobus-xio-doc 6.6-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms