UDP receiver queue?


I have implemented a UDP based embedded system that receives JAUS (Joint Autonomous Unmanned Systems protocol) messages in a robot. My question is:

Does the Linux IP stack queue incoming UDP messages or must I read the message to clear the buffer before another message is sent to keep from losing messages? If some number of datagrams are queued then what is the default queue size/limit? Is there a way to change it?


Reply to
Loading thread data ...


Depends on the message size relative to the socket buffer.

make a getsockopt() call with the SO_RCVBUF option against a UDP socket. the default/limit could differ based on distro and what the admin may have done via sysctl.

setsockopt() calls up to the configured "sysctl" limits which you can then alter.

just because setsockopt() returned a success status does not mean you got the socket buffer limit you requested, you should follow a setsockopt() with a getsockopt() call.

rick jones

The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
 Click to see the full signature
Reply to
Rick Jones

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.