On 27-8-2013 22:40, Chris Angelico wrote: > Right. When you use TCP sockets, there's no boundaries, so you could > get two pickles in one recv, or you could get one and a half, or > anything. It depends partly on your buffer sizes and things; if you're > sending very short messages (less than a kilobyte), and have long > delays between them, chances are you'll get one write in one read; but > it's not guaranteed. > > ChrisA >
More horror stories: the same is also true for send(). Thankfully, Python provides a sendall(). But that doesn't work on some systems when the socket is in non-blocking mode. Meh. Irmen -- http://mail.python.org/mailman/listinfo/python-list