[EMAIL PROTECTED]:
>i have discovered that the server will send a request for the heartbeat
>ping if its almost timed out, so i use the length of the message to
>determine what to do with it.
>
>msg = sockobj.recv(1024)
>
>if len(msg) == 158:
>    record the data
>elif len(msg) == (34): # length of request for ping
>    ping the server

Incorrect. There are no 'messages' with TCP, only bytes.

-- 
René Pijlman
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to