Commit Graph

89 Commits

Author SHA1 Message Date
Brett Cannon
e3fa0611a9 Fix test_socket's test for socket.getfqdn() to also accept the result from
socket.gethostname() as a valid return value.

Also clarified the docs as they were a little hazy on the subject matter.
2005-03-12 06:15:56 +00:00
Dave Cole
e8bbfe4e63 Patch #1015012. Improve markup and punctuation in libsocket.tex 2004-08-26 00:51:16 +00:00
Dave Cole
07fda7e3a0 Updated the socketpair() docstring and documentation to explain that the
default famility is AF_UNIX if defined for the platform, otherwise the
default is AF_INET.
2004-08-23 05:16:23 +00:00
Dave Cole
9dc19c2515 Ooops - for some reason I had the wrong versionadded... 2004-08-09 05:59:09 +00:00
Dave Cole
331708b226 Patch #1003700: Add socketpair function to socket module. 2004-08-09 04:51:41 +00:00
Barry Warsaw
11b91a0ea3 Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional.  Update the tests and the docs.
2004-06-28 00:50:43 +00:00
Fred Drake
175d18840a avoid backticks in examples; use repr() instead 2004-06-03 16:23:23 +00:00
Fred Drake
cee8879a7d note that the error code for socket.gaierror will be one of the EAI_*
constants
(closes SF bug #837929)
2004-05-05 04:18:11 +00:00
Neal Norwitz
ba813e2089 #928751, fix typos in socket doc 2004-04-03 18:02:37 +00:00
Fred Drake
fcc51767bd update signature of the socket constructor
(could someone backport this to Python 2.3.x please?)
2004-01-27 18:21:26 +00:00
Guido van Rossum
5a92175fbc After hearing from someone who gave up on timeout sockets due to a
mistake in his code, I'm adding a note explaining that you should call
settimeout() before connect().
2003-12-13 22:12:53 +00:00
Martin v. Löwis
94681fc4a3 Patch #849595: Add socket.shutdown() constants. 2003-11-27 19:40:22 +00:00
Brett Cannon
b278ac4e46 Add note about fileno not being usable as a normal file descriptor in Windows. 2003-08-05 03:51:24 +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