<[EMAIL PROTECTED]> wrote: >elif len(msg) == (34): # length of request for ping > ping the server
This seems really dangerous. You are obviously writing to some already defined (and hopefully, documented) protocol. What does the protocol spec say about ping request messages? I would be very surprised if the spec says that a ping request is defined as any message which is 34 bytes long. More likely, it says something like, "A ping request is defined by the command code being set to 5" or something like that. That's what you should be testing, not the length of the message. -- http://mail.python.org/mailman/listinfo/python-list