January 2nd, 2005, 04:10 PM
Socket Recv Definition
I was just wondering if a socket could receive a definition. For example,
This would be the definition (just an example) and I would do
s.recv(data()). Will that make the socket receive all of the data in that definition?
January 2nd, 2005, 07:35 PM
Everything that comes into your socket over the network goes into a behind-the-scenes buffer. socket.recv() takes all the data that's currently in the buffer and returns it as a string. If you pass it a number as a parameter then it will take up-to-that-many bytes from the buffer.
That's all it does.