78 Commits

Author SHA1 Message Date
Fred Drake
6777b2e118 note that the error code for socket.gaierror will be one of the EAI_*
constants
(closes SF bug #837929)
2004-05-05 04:15:30 +00:00
Neal Norwitz
4b9fe25193 #928751, fix typos in socket doc 2004-04-03 18:03:51 +00:00
Raymond Hettinger
476fcae4d7 SF bug #774411: Typo in socket documentation 2003-07-20 01:10:15 +00:00
Raymond Hettinger
be2528d866 SF patch #760257: add socket.timeout exception
(Contributed by Bob Halley)

Add documentation for the new socket.timeout exception.
2003-06-29 04:55:59 +00:00
Neal Norwitz
3a03de4a27 SF #757229, fix libsocket.tex typo 2003-06-20 17:11:39 +00:00
Fred Drake
d198f38505 - add availability statements for some of the new APIs
- lots of general cleanup
2003-04-25 16:16:02 +00:00
Guido van Rossum
b016752d8b Fix a copy-paste error: the paragraph about inet_ntop's use was copied
literally from inet_pton.
2003-04-25 15:26:58 +00:00
Neal Norwitz
6eb502f267 Add versionadded for has_ipv6 attribute 2003-04-25 14:53:48 +00:00
Guido van Rossum
47dfa4a89a Patch by Jp Calderone:
- 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-25 05:48:32 +00:00
Skip Montanaro
2a403e8a7e add descriptions of {get,set}defaulttimeout. 2003-03-20 17:58:12 +00:00
Guido van Rossum
11ba094957 Major overhaul of timeout sockets:
- 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.
2002-06-13 15:07:44 +00:00
Guido van Rossum
715b861d94 Clarify the interaction between timeout/non-blocking mode, makefile
and fromfd.
2002-06-07 12:38:23 +00:00
Neal Norwitz
62a7f63a24 Fix typo 2002-06-07 12:36:44 +00:00
Guido van Rossum
fc9823b1a9 Clarify the interaction between blocking and timeouts. Explain that
fromfd() assumes a blocking non-timeout socket.
2002-06-07 03:39:21 +00:00
Neal Norwitz
bdbd84fdac Add version info, and fix another typo and wording spotted by /F. I think this is what he meant. :-) 2002-06-06 22:24:10 +00:00
Fred Drake
1a06fb0605 Fix typo spotted by Fredrik Lundh. 2002-06-06 22:19:20 +00:00
Fred Drake
6c6d662760 Fix some markup errors and adjust wording slightly. 2002-06-06 21:57:48 +00:00
Guido van Rossum
be946bfea7 SF patch 555085 (timeout socket implementation) by Michael Gilfix.
I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.

I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this.  Next I'm going to try it Windows before
Tim complains.

No way is this a bugfix candidate. :-)
2002-06-06 21:51:01 +00:00
Fred Drake
39960f6ec9 Fix the erroneous availability annotation for s.makefile() from the last
checkin (my fault!).
Wrap some long lines and fix some markup inconsistencies.
2001-12-22 19:07:58 +00:00
Fred Drake
87fa3aa12c Add notes that fromfd() and s.makefile() are Unix-specific.
This fixes SF bug #495896.

Fix up various markup consistency & style guide conformance nits.
2001-12-21 17:45:03 +00:00
Fred Drake
39368c1053 Added documentation of the sendall() method, and a note to the send() method
that it does not guarantee that all data is sent.
This closes SF patch #474307.
2001-12-05 05:25:59 +00:00
Fred Drake
0aa811c527 Use the \note and \warning macros where appropriate. 2001-10-20 04:24:09 +00:00
Fred Drake
aad8bb5d7a When stating that some parameters to makefile() are similar to the open()
parameters, given a hyperlink to the right part of the documentation to
make it easier to look those up.  Also, refer to the file() function/
constructor instead of open() now that that is where the actual docs for
those parameters live.
This closes SF bug #472004.
2001-10-19 17:22:29 +00:00
Jeremy Hylton
cb43c085e2 Document that keyfile and certfile are now optional.
XXX Forgot to mention this in the last socketmodule.c checkin.
2001-10-11 16:17:22 +00:00
Fred Drake
3fc291a1d7 Fix some markup errors. 2001-09-27 04:17:20 +00:00