From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: dccp@vger.kernel.org
Subject: Re: dccp send
Date: Wed, 02 Jan 2008 02:37:53 +0000 [thread overview]
Message-ID: <20080102023753.GG25000@ghostprotocols.net> (raw)
In-Reply-To: <200801020141.16432.tomasz@grobelny.oswiecenia.net>
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
next prev parent reply other threads:[~2008-01-02 2:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 0:41 dccp send Tomasz Grobelny
2008-01-02 2:37 ` Arnaldo Carvalho de Melo [this message]
2008-01-02 22:34 ` Tomasz Grobelny
2008-01-03 1:02 ` Arnaldo Carvalho de Melo
2008-01-03 22:19 ` Tomasz Grobelny
2008-01-03 22:25 ` Ian McDonald
2008-01-03 23:23 ` Arnaldo Carvalho de Melo
2008-01-03 23:27 ` Arnaldo Carvalho de Melo
2008-01-04 16:28 ` Tomasz Grobelny
2008-01-04 18:56 ` Ian McDonald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080102023753.GG25000@ghostprotocols.net \
--to=acme@redhat.com \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.