[zeromq-dev] patch: non-blocking tcp accept
hurtonm at gmail.com
Wed Apr 29 15:24:54 CEST 2009
Thanks. I have looked at the patch and it seems ok. We will merge to
the trunk soon.
On Wed, Apr 29, 2009 at 10:05 AM, Dhammika Pathirana <dhammika at gmail.com> wrote:
> Hi Martin,
> Here's the patch, I added a #define block in accept to check for
> platform specific errno values.
> I didn't add errnos for OpenVMS, it's not defined in top level config file.
> Patch is released under MIT license.
> On Tue, Apr 28, 2009 at 3:35 AM, Martin Sustrik <sustrik at fastmq.com> wrote:
>> Hi Dhammika,
>>> Patch to add non-blocking tcp accept.
>>> 1. sets non-blocking flag in tcp listener socket
>>> 2. moves accept to tcp_listener.in_event()
>>> 3. passes native socket descriptor to tcp_socket constructor
>>> Builds and tested on linux.
>>> Would appreciate if someone can run a quick build on a win32 box.
>>> Hopefully it'll build without any drama.
>>> Requires few changes in zmq_server, perf and examples (mainly in
>>> tcp_socket constructor).
>>> If we're happy with this, I'll send a full patch.
>> The patch looks OK. Please, do send the full patch (and state it's licensed
>> under MIT license).
>> The one thing I'm unsure of is EAGAIN/EWOULDBLOCK distinction. It seems that
>> both Linux and Win32 assign the same numeric value to both errors. I am not
>> sure of other platforms.
>> POSIX says:
>> Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
>> Operation would block (may be the same value as [EAGAIN]).
>> Pretty confusing...
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev