Author neologix
Recipients neologix, pitrou, pturing, python-dev, sbt, vstinner
Date 2014-07-23.22:21:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> You should copy the code from asyncio.windows_utils.socketpair(). It checks also type and proto parameter: raise a ValueError for unsupported values (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It handles BlockingIOError and InterruptedError on connect (I never understood why these exceptions are simply ignored).

I could use it then, although all those checks are unnecessary since
the underlying socket() call will check it for us.

> You patch checks the address received by accept() and retry. It's a little bit surprising. If you get an unexpected connection, maybe an exception should be raised, instead of just ignoring it. Maybe we should modify the code in asyncio to check also the address?

If you have an unexpected connection, it should be dropped, and we
should wait until the client we're expecting connects, there's no
reason to raise an error.
But I'll just reuse asyncio's version.

> Finally, please add socketpair() directly to the socket module. It is useful for applications, not only for tests.

Well, that's what I suggested initially, but never got any reply, so I
went for the least intrusive. I personally think too it should belong
to socket module.

So here it is.
File name Uploaded
socketpair-4.diff neologix, 2014-07-23.22:21:34
Date User Action Args
2014-07-23 22:21:35neologixsetrecipients: + neologix, pitrou, vstinner, python-dev, sbt, pturing
2014-07-23 22:21:34neologixlinkissue18643 messages
2014-07-23 22:21:34neologixcreate