summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
AgeCommit message (Collapse)AuthorLines
2004-12-30Patch 728330: Fix compilation problems on IRIX.Martin v. Löwis-1/+23
2004-06-02Patch #924294: Do not check for AF_INET6 if it is not defined.Martin v. Löwis-1/+1
2004-04-11Backport to 2.3:Andrew MacIntyre-0/+4
Fixes for AF_UNIX support on OS/2: - return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
2004-04-04Backport to 2.3 to support Zope 2.7 on OS/2:Andrew MacIntyre-4/+4
OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that the socket name must start with /socket32/. Unlike Unix systems, this file never exists in the file system.
2003-10-20Backport checkin:Walter Dörwald-1/+1
Fix a bunch of typos in documentation, docstrings and comments. (From SF patch #810751)
2003-10-04made the SGI INET_ADDRSTRLEN apply for any compiler on Irix. Both theAnthony Baxter-4/+7
SGI compiler and GCC seem to need this.
2003-10-03Patch #813445: Add missing socket.IPPROTO_IPV6.Martin v. Löwis-0/+3
2003-08-07Release host name memory. Fixes #783312.Martin v. Löwis-6/+12
2003-08-05Patch #781722: Reject AF_INET6 if IPv6 is disabled.Martin v. Löwis-0/+8
2003-07-17Get socketmodule compiling on IRIX 6.5.10.Jeremy Hylton-2/+11
I don't think the fix here is very good, but I'm not sure what would be better. In particular, we should not be defining _SGIAPI, but lots of things break if we remove it.
2003-07-09Fix [ 766669 ] Consistent GPF on exitMark Hammond-1/+1
Use Py_AtExit instead of atexit so we are called during Py_Finalize() rather than during DLL teardown.
2003-06-29SF patch #760257: add socket.timeout exceptionRaymond Hettinger-38/+113
(Contributed by Bob Halley) Added a new exception, socket.timeout so that timeouts can be differentiated from other socket exceptions. Docs, more tests, and newsitem to follow.
2003-05-10Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis-8/+36
riscospath.extsep, and use os.extsep throughout.
2003-05-09Yet another addition to [731644]: only use the lock if thread-supportJust van Rossum-2/+2
is enabled.
2003-05-09Addition to [731644]: also use the lock when using the getaddrinfoJust van Rossum-2/+2
emulation (ie. when HAVE_GETADDRINFO isn't defined).
2003-05-09[ 731644] & [ 604210 ] Release the GIL around getaddrinfo(), yet protectJust van Rossum-10/+45
access with lock on those platforms that getaddrinfo() isn't (known to be) thread-safe. Thanks to MvL for mentoring this patch.
2003-05-03Patch #724588: Check whether the address of hstrerror and inet_pton canMartin v. Löwis-0/+10
be taken, and define NI_MAX{HOST|SERV} if necessary.
2003-05-03Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis-1/+9
2003-05-02Patch 731209: Restore socketmodule's behaviour with dotted quad addressesAnthony Baxter-0/+16
to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly, not passed to the resolver for a pointless lookup.
2003-05-01Patch #725942: Always rename emulation functions.Martin v. Löwis-2/+5
2003-04-25Patch by Jp Calderone:Guido van Rossum-1/+114
- The socket module now provides the functions inet_pton and inet_ntop for converting between string and packed representation of IP addresses. See SF patch #658327. This still needs a bit of work in the doc area, because it is not available on all platforms (especially not on Windows).
2003-04-18Implement IDNA (Internationalized Domain Names in Applications).Martin v. Löwis-5/+25
2003-03-29Rename LONG_LONG to PY_LONG_LONG. Fixes #710285.Martin v. Löwis-1/+1
2003-02-19The connect timeout code wasn't working on Windows.Guido van Rossum-12/+13
Rather than trying to second-guess the various error returns of a second connect(), use select() to determine whether the socket becomes writable (which means connected).
2003-02-13socket_inet_aton(): ip_addr was left undefined before use in theTim Peters-9/+9
!HAVE_INET_ATON case. Repaired that, and tried to repair what looked like out-of-date comments.
2003-02-13Ummm, try to get it right this timeNeal Norwitz-1/+1
2003-02-13Use configure to check for inet_aton.Neal Norwitz-1/+1
2003-02-12Addressing SF bug #643005, implement socket.inet_aton() usingGuido van Rossum-1/+17
inet_aton() rather than inet_addr() -- the latter is obsolete because it has a problem: "255.255.255.255" is a valid address but indistinguishable from an error. (I'm not sure if inet_aton() exists everywhere -- in case it doesn't, I've left the old code in with an #ifdef.)
2003-01-31SF patch #678257 by Geoff Talvola.Guido van Rossum-1/+1
In sendall(), do an internal select before each send() call, instead of only for the first one.
2003-01-06Patch #661760: Cygwin auto-import module patchJason Tishler-6/+3
The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
2003-01-02OS/2 sockets do not support AF_UNIX, even though EMX headers define itAndrew MacIntyre-4/+4
2002-12-11Patch #650422: Use Posix AF_ constants instead of PF_ ones.Martin v. Löwis-5/+7
2002-12-06Don't include <ioctl.h> unless on __VMS.Martin v. Löwis-1/+3
2002-12-06Patch #614055: Support OpenVMS.Martin v. Löwis-1/+106
2002-11-02Use O_NONBLOCK rather than O_NDELAY, so we get POSIX non-blocking I/O.Neal Norwitz-4/+4
On HPUX, Solaris, Tru64 (Dec UNIX), and IRIX (I think), O_NONBLOCK is the POSIX version of non-blocking I/O which is what we want. On Linux and FreeBSD (at least), O_NONBLOCK and O_NDELAY are the same. So this change should have no negative effect on those platforms. Tested on Linux, Solaris, HPUX. Thanks to Anders Qvist for diagnosing this problem.
2002-09-19Patch #608999: Fix portability problems with MIPSPro 7.xMartin v. Löwis-0/+8
2002-09-03Update the module doc comment.Guido van Rossum-1/+3
2002-08-09SF bug #592645 fix memory leak in socket.getaddrinfoNeal Norwitz-0/+2
2002-08-08The other half of the patches added to SF patch 555085 by A IGuido van Rossum-0/+2
MacIntyre. At least on OS/2, a subsequent connect() on a nonblocking socket returns errno==EISCONN to indicate success. This seems harmless on Unix.
2002-08-08Clean up some docstrings. Some docstrings didn't show their returnGuido van Rossum-10/+11
value; others were inconsistent in what to name the argument or return value; a few module-global functions had "socket." in front of their name, against convention.
2002-08-06internal_connect(): Windows. When sock_timeout > 0 and connect() yieldsTim Peters-6/+14
WSAEWOULDBLOCK, the second connect() attempt appears to yield WSAEISCONN on Win98 but WSAEINVAL on Win2K. So accept either as meaning "yawn, fine". This allows test_socket to succeed on my Win2K box (which it already did on my Win98SE box).
2002-08-02Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond-1/+1
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-07-28Pass length of result structure into setipaddr. Fixes bug #565747.Martin v. Löwis-8/+12
Committed to 2.2 branch.
2002-07-25Put checks for error returns in the right place.Jeremy Hylton-2/+8
2002-07-25Extended socket.htonl and ntohl to accept longs.Jeremy Hylton-15/+53
Fixes SF bug #568322. The code should raise an OverflowError if the long is > 32 bits, even on platforms where sizeof(long) > 4.
2002-07-23Replace DL_IMPORT with PyMODINIT_FUNC and remove "/export:init..." linkMark Hammond-1/+1
command line for Windows builds. This should allow MSVC to import and build the Python MSVC6 project files without error.
2002-07-19Bail out early from internal_select() when socket file descriptorGuido van Rossum-0/+5
closed. Prevents core dump.
2002-07-18A Python float is a C double; redeclare defaulttimeout as such; stopsTim Peters-1/+1
compiler wngs on Windows.
2002-07-18Silence warning about getdefaulttimeout in PyMethodDef.Guido van Rossum-1/+1
2002-07-18Add default timeout functionality. This adds setdefaulttimeout() andGuido van Rossum-1/+65
getdefaulttimeout() functions to the socket and _socket modules, and appropriate tests.