This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients mpb, neologix
Date 2013-11-10.08:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0D1smaALO2D58cwr0YbT9+ucuQNNS7RbHEdh_++z2Z-w@mail.gmail.com>
In-reply-to <1384044062.92.0.564216162153.issue19530@psf.upfronthosting.co.za>
Content
> After some research...
>
>> Which is normal, since UDP sockets aren't connected.
>
> But UDP sockets can be connected!
>

No, they can't.
"Connecting" a UDP socket doesn't established a duplex connection like
in TCP: it's just a shortand for not having to repeat the destination
address upon every sendto()/sendmsg().

> FYI, the FreeBSD (and OpenBSD) shutdown manpages anticipate calling shutdown on DGRAM sockets.  And the Linux connect manpage discusses connecting DGRAM sockets.

And since shutdown() is designed for duplex connection, it doesn't
really make much sense. It might very well work when you passe SHUT_RD
because it can be interpreted as triggering an EOF, but I wouldn't
rely on this.

> Here is the updated Python code.  I do expect to try to report this upstream.  (Also, I now have C/pthreads code, if you want to see it.  As expected, C behaves identically.)

So you see it's not a Python "bug". It's really not a bug at all, but
if you want to report this upstream, have fun :-).
History
Date User Action Args
2013-11-10 08:47:16neologixsetrecipients: + neologix, mpb
2013-11-10 08:47:16neologixlinkissue19530 messages
2013-11-10 08:47:15neologixcreate