Em Wed, Jan 02, 2008 at 01:41:16AM +0100, Tomasz Grobelny escreveu:
> When I use dccp does sendmsg function block (until it sends the packet)? If 
> so, should it? In either case, how to make it just queue the packet and 
> return?

The interface is the same as for other AF_INET transports, use
O_NONBLOCK (open, fcntl) if you want it to be non blocking.

It queues it in the write routine and tries to send it right away, but
doesn't waits for actually sending the packet, i.e. it only checks if
there is write space available, if you set O_NONBLOCK and there is no
space it returns ENOBUFS, if O_NONBLOCK is not set it will sleep waiting
for write space to be made available, when the process will be awaken.

Use setsockopt(SO_SNDTIMEO) to change the default send timeout, etc.

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to