[EMAIL PROTECTED] wrote: > i have a script that waits for message packets from a data server over > a socket.
If you're using TCP, bear in mind that you do not receive packets - you receive a stream of data, which may usually come in the same quantities as it was sent, but not always. If you don't take that into account, you may end up missing a valid message because it arrived in several parts. > it works fine for a while, but the server requires that i send a > heartbeat ping every 600 seconds or it will terminate the connection. It is probably worth just reconnecting if necessary. After all, you could be disconnected for other reasons too. -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list