| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Use Py_AtExit instead of atexit so we are called during Py_Finalize()
rather than during DLL teardown.
|
| |
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
| |
|
|
| |
is enabled.
|
| |
|
|
| |
emulation (ie. when HAVE_GETADDRINFO isn't defined).
|
| |
|
|
|
| |
access with lock on those platforms that getaddrinfo() isn't (known to be)
thread-safe. Thanks to MvL for mentoring this patch.
|
| |
|
|
| |
be taken, and define NI_MAX{HOST|SERV} if necessary.
|
| | |
|
| |
|
|
|
| |
to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly,
not passed to the resolver for a pointless lookup.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- 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).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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).
|
| |
|
|
|
| |
!HAVE_INET_ATON case. Repaired that, and tried to repair what looked
like out-of-date comments.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
| |
In sendall(), do an internal select before each send() call, instead
of only for the first one.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
MacIntyre. At least on OS/2, a subsequent connect() on a nonblocking
socket returns errno==EISCONN to indicate success. This seems
harmless on Unix.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
for Py_Main().
Thanks to Kalle Svensson and Skip Montanaro for the patches.
|
| |
|
|
| |
Committed to 2.2 branch.
|
| | |
|
| |
|
|
|
|
|
| |
Fixes SF bug #568322.
The code should raise an OverflowError if the long is > 32 bits, even
on platforms where sizeof(long) > 4.
|
| |
|
|
|
| |
command line for Windows builds. This should allow MSVC to import and
build the Python MSVC6 project files without error.
|
| |
|
|
| |
closed. Prevents core dump.
|
| |
|
|
| |
compiler wngs on Windows.
|
| | |
|
| |
|
|
|
| |
getdefaulttimeout() functions to the socket and _socket modules, and
appropriate tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure. Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers. (In
fact, we expect that the compilers are all fixed eight years later.)
I'm leaving staticforward and statichere defined in object.h as
static. This is only for backwards compatibility with C extensions
that might still use it.
XXX I haven't updated the documentation.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
that retries the connect() call in timeout mode so it can be shared
between connect() and connect_ex(), and needs only a single #ifdef.
The test for this was doing funky stuff I don't approve of,
so I removed it in favor of a simpler test. This allowed me
to implement a simpler, "purer" form of the timeout retry code.
Hopefully that's enough (if you want to be fancy, use non-blocking
mode and decode the errors yourself, like before).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- setblocking(0) and settimeout(0) are now equivalent, and ditto for
setblocking(1) and settimeout(None).
- Don't raise an exception from internal_select(); let the final call
report the error (this means you will get an EAGAIN error instead of
an ETIMEDOUT error -- I don't care).
- Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets,
so other theads can run (this was a bug in the original code).
- Redid the retry logic in connect() and connect_ex() to avoid masking
errors. This probably doesn't work for Windows yet; I'll fix that
next. It may also fail on other platforms, depending on what
retrying a connect does; I need help with this.
- Get rid of the retry logic in accept(). I don't think it was needed
at all. But I may be wrong.
|
| | |
|
| |
|
|
| |
returned.
|