Martin Gergov added the comment:
--- a/Modules/socketmodule.c Tue Jul 02 09:07:53 2013 -0400
+++ b/Modules/socketmodule.c Sat Jul 06 21:08:40 2013 +0300
@@ -3673,6 +3673,15 @@
{
int how;
int res;
+ struct sockaddr_in sin;
+ if (s->sock_type == SOCK_DGRAM){
+ memset((char *)&sin, 0, sizeof(sin));
+ sin.sin_family = AF_UNSPEC;
+ Py_BEGIN_ALLOW_THREADS
+ res = connect(s->sock_fd, (struct sockaddr *)&sin, sizeof(sin));
+ Py_END_ALLOW_THREADS
+ return Py_None;
+ }
how = _PyLong_AsInt(arg);
if (how == -1 && PyErr_Occurred())
The shutdown method seems a suitable candidate, but a disconnect() method(which
is semantically more correct) could be introduced.
----------
nosy: +marto1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18095>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com