TCP Socket question

Rick Lee rwklee at home.com
Wed Nov 15 22:36:33 EST 2000


Thank you Fredrik and Cary.  It sure is nice to see heavy-weight evangelists
answering posts like mine.

And thanks for clarifying how soon send() returns.

- Rick

Fredrik Lundh wrote:

> Rick Lee wrote:
> > Thanks for pointing a way; but what is "select"?
>
> the select function in the select module, found in the
> select chapter in the library reference:
>
> http://www.python.org/doc/current/lib/module-select.html
>
> > Also, regarding writes, in my experience the write() call returns the number
> > of bytes as soon as the sent bytes are accepted into the destination host's
> > buffer, but before the recv() actually starts taking the bytes out of this
> > buffer.
>
> optimist ;-)
>
> quoting from the POSIX docs:
>
>     "Successful completion of a call to send() does not
>     guarantee delivery of the message. A return value
>     of -1 indicates only locally-detected errors.
>
>     "The send() function is identical to /.../ write() if no
>     flags are used."
>
> </F>




More information about the Python-list mailing list