[zeromq-dev] assertion failure with master
mato at kotelna.sk
Mon Nov 8 12:35:25 CET 2010
ph at imatix.com said:
> On Mon, Nov 8, 2010 at 12:20 PM, Martin Lucina <mato at kotelna.sk> wrote:
> > So you're saying a non-blocking send () may simply return with no error and
> > less bytes written? I guess that makes sense, I was wondering about that
> > case but the POSIX docs were not terribly obvious on this.
> I've never heard of this before. The Linux man page for send() says:
> "If the message is too long to pass atomically through the underlying
> protocol, the error EMSGSIZE is returned, and the message is not
> Could that be Linux-specific?
EMSGSIZE also appears to be in the POSIX documentation for send ():
The send() function shall fail if:
The message is too large to be sent all at once, as the
However, the wording about when send () might fail is kind of vague:
The length of the message to be sent is specified by the length
argument. If the message is too long to pass through the underlying
protocol, send() shall fail and no data shall be transmitted.
If space is not available at the sending socket to hold the message
to be trans‐ mitted, and the socket file descriptor does not
have O_NONBLOCK set, send() shall block until space is available.
If space is not available at the sending socket to hold the
message to be transmitted, and the socket file descriptor does have
O_NONBLOCK set, send() shall fail. The select() and poll()
functions can be used to determine when it is possible to send more
The general wording there makes me think EMSGSIZE is the case where e.g.
you're trying to send a >64k message down a UDP socket.
Chuck, what system are you on? Linux?
More information about the zeromq-dev