Can local message-based sockets transfer messages up to the SO_SNDBUF/SO_RCVBUF limits, or where can the so-called 'fixed maximum length' be determined for a descriptor created with socket(PF_UNIX, SOCK_SEQPACKET, 0)
or socket(PF_UNIX, SOCK_DGRAM, 0)
?
views:
29answers:
2Your datagrams will be queued in the socket send/receive buffers up to a maximum of SO_SNDBUF and SO_RCVBUF respectively. Datagrams will be discarded past this limit.
Note that datagrams do not have the exact size of the data you put in them.
I don't really remember, but I think you can tweak those settings. It's always wiser, though, to do your own buffering when dealing with UDP sockets.
edit: sorry about that, right you are. This might be of use:
The SO_SNDBUF socket option does have an effect for Unix domain sock- ets, but the SO_RCVBUF option does not. For datagram sockets, the SO_SNDBUF value imposes an upper limit on the size of outgoing data- grams. This limit is calculated as the doubled (see socket(7)) option value less 32 bytes used for overhead
from man unix
The SO_SNDBUF socket option does have an effect for Unix domain sock‐ ets, but the SO_RCVBUF option does not. For datagram sockets, the SO_SNDBUF value imposes an upper limit on the size of outgoing data‐ grams. This limit is calculated as the doubled (see socket(7)) option value less 32 bytes used for overhead.