TCP Socket question

Rick Lee rwklee at home.com
Tue Nov 14 21:48:31 EST 2000


Hi,

I have a question about the s.recv method for a TCP socket:  The syntax
is:

    s.recv (bufsize [,flags])

And the manual says: "Receives data from the socket.  The data is
returned as a string.  The maximum amount of data to be received is
specified by bufsize..."

My question is: what happens if the sender's message is larger than
bufsize?  Is the rest discarded, or what?  Also, how would I know that
this condition has occurred?  Note that the flags values don't seem to
help with this question.

Thanks in advance

- Rick Lee




More information about the Python-list mailing list