summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 1754489 by vlahan:Armin Rigo2008-01-231-2/+2
| | | | improve portability of address length calculation for AF_UNIX sockets
* Patch #1019808 from Federico Schwindt: Return correct socket error whenAndrew M. Kuchling2008-01-191-9/+16
| | | | | | | | a default timeout has been set, by using getsockopt() to get the error condition (instead of trying another connect() call, which seems to be a Linuxism). 2.5 bugfix candidate, assuming no one reports any problems with this change.
* Make Modules/socketobject.c compile for Windows again.Thomas Heller2008-01-131-4/+7
|
* Removed unused variableChristian Heimes2008-01-111-1/+1
|
* Guard definition of TIPC_SUB_CANCEL with an #ifdef.Georg Brandl2008-01-111-1/+4
|
* Comment-out missing constant (from rev 59819)Raymond Hettinger2008-01-111-1/+1
|
* Issue #1646: Make socket support TIPC. The socket module now has supportChristian Heimes2008-01-071-1/+153
| | | | | for TIPC under Linux, see http://tipc.sf.net/ for more information. Thanks to Alberto Bertogli for the patch
* Added interface to Windows' WSAIoctl and a simple example for a network sniffer.Christian Heimes2008-01-041-1/+42
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-8/+8
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Issue #1645 by Alberto Bertogli. Fix a comment.Guido van Rossum2007-12-181-6/+6
|
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-221-0/+4
| | | | | I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k. Have fun! :)
* A patch from issue 1378 by roudkerk:Guido van Rossum2007-11-161-81/+5
| | | | | | | | Currently on Windows set_error() make use of a large array which maps socket error numbers to error messages. This patch removes that array and just lets PyErr_SetExcFromWindowsErr() generate the message by using the Win32 function FormatMessage().
* Change socket.error to inherit from IOError rather than being a standGregory P. Smith2007-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here: http://mail.python.org/pipermail/python-dev/2007-July/073749.html I chose IOError rather than EnvironmentError as the base class since socket objects are often used as transparent duck typed file objects in code already prepared to deal with IOError exceptions. also a minor fix: urllib2 - fix a couple places where IOError was raised rather than URLError. for better or worse, URLError already inherits from IOError so this won't break any existing code. test_urllib2net - replace bad ftp urls.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-10/+9
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Fix build on FreeBSD. Bluetooth HCI API in FreeBSD is quite differentHye-Shik Chang2007-06-051-2/+5
| | | | | from Linux's. Just fix the build for now but the code doesn't support the complete capability of HCI on FreeBSD yet.
* Fix method names. Will backport.Neal Norwitz2007-03-311-3/+4
|
* Bug 1688393. Adds a control of negative values inFacundo Batista2007-03-281-2/+8
| | | | socket.recvfrom, which caused an ugly crash.
* Update 1432399 to removal of _BT_SOCKADDR_MEMB.Martin v. Löwis2007-02-141-2/+1
|
* Patch #1432399: Add HCI sockets.Martin v. Löwis2007-02-141-0/+34
|
* Patch #1657276: Make NETLINK_DNRTMSG conditional.Martin v. Löwis2007-02-131-0/+2
| | | | Will backport.
* Patch #1635058 by Mark Roberts: ensure that htonl and friends never accept orGuido van Rossum2007-01-141-4/+24
| | | | return negative numbers, per the underlying C implementation.
* Comment typoAndrew M. Kuchling2006-12-191-1/+1
|
* Patch #1544279: Improve thread-safety of the socket module by movingMartin v. Löwis2006-12-031-52/+45
| | | | | the sock_addr_t storage out of the socket object. Will backport to 2.5.
* Patch #1511317: don't crash on invalid hostname infoGeorg Brandl2006-08-141-11/+14
|
* Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs duringNeal Norwitz2006-08-021-18/+36
| | | | | a socket operation on a socket with a timeout, the exception will be caught correctly. Previously, the exception was not caught.
* Fix spelling.Georg Brandl2006-07-281-1/+1
|
* Allow socketmodule to compile on NetBSD -current, whose bluetooth APIMatt Fleming2006-07-281-0/+8
| | | | differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
* #1494314: Fix a regression with high-numbered sockets in 2.4.3. ThisAnthony Baxter2006-07-111-16/+44
| | | | | means that select() on sockets > FD_SETSIZE (typically 1024) work again. The patch makes sockets use poll() internally where available.
* Patch #1516912: improve Modules support for OpenVMS.Neal Norwitz2006-07-101-49/+43
|
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-2/+6
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* Fix a refleak in recvfrom_intoNeal Norwitz2006-06-081-1/+1
|
* Remove unused variable (and stop compiler warning)Neal Norwitz2006-06-061-1/+0
|
* Fixes in struct and socket from merge reviews.Martin Blais2006-06-041-35/+38
| | | | | | | | | | | | | - Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
* Simplify further by using AddStringConstantNeal Norwitz2006-05-301-4/+2
|
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-5/+3
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.Georg Brandl2006-05-291-3/+5
| | | | Fix refleak in exceptions.
* Support for buffer protocol for socket and struct.Martin Blais2006-05-261-136/+316
| | | | | | | | | | * Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer protocol (send and sendto already did). * Added struct.pack_to(), that is the corresponding buffer compatible method to unpack_from(). * Fixed minor typos in arraymodule.
* Fix SF bug #1476111: SystemError in socket sendto. The AF_INET6 andThomas Wouters2006-04-251-0/+16
| | | | | | AF_PACKET cases in getsockaddrarg were missing their own checks for tuple-ness of the address argument, which means a confusing SystemError was raised by PyArg_ParseTuple instead.
* Patch 1471925 - Weak linking support for OSXRonald Oussoren2006-04-231-2/+34
| | | | | | This patch causes several symbols in the socket and posix module to be weakly linked on OSX and disables usage of ftime on OSX. These changes make it possible to use a binary build on OSX 10.4 on a 10.3 system.
* SF Patch #1062014: AF_UNIX sockets under Linux have a specialArmin Rigo2006-04-191-6/+31
| | | | abstract namespace that is now fully supported.
* Patch #1191065: Fix preprocessor problems on systems where recvfromMartin v. Löwis2006-04-151-6/+8
| | | | is a macro.
* Off-by-one buffer overflow error.Armin Rigo2006-04-121-1/+1
|
* Patch #1462080: Conditionalize some NETLINK defines.Martin v. Löwis2006-04-061-0/+11
|
* Bug #1460564: document that socket.fromfd() duplicates the givenGeorg Brandl2006-04-011-2/+3
| | | | file descriptor.
* RFE #567972: Socket objects' family, type and proto properties areGeorg Brandl2006-03-171-1/+10
| | | | now exposed via new get...() methods.
* More unconsting.Martin v. Löwis2006-02-271-1/+1
|
* NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older LinuxGuido van Rossum2006-02-211-0/+4
| | | | systems; define these conditionally.
* Bug #854823: socketmodule now builds on Sun platforms even whenGeorg Brandl2006-02-201-2/+2
| | | | INET_ADDRSTRLEN is not defined.
* Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.Martin v. Löwis2006-02-111-0/+7
| | | | Proposed by Tim Peters.
* Bug #876637, prevent stack corruption when socket descriptorNeal Norwitz2006-02-071-2/+31
| | | | | | | | | | | | | | | | | | is larger than FD_SETSIZE. This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE which is typically only available to root. Since this wouldn't normally be run in a test (ie, run as root), it doesn't seem too worthwhile to add a normal test. The bug report has one version of a test. I've written another. Not sure what the best thing to do is. Do the check before calling internal_select() because we can't set an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS. This seemed the clearest solution, ie handle before calling internal_select() rather than inside. Plus there is at least one place outside of internal_select() that needed to be handled. Will backport.