[Tutor] Re: socket question

Scott syrinx@simplecom.net
Mon Dec 23 02:51:02 2002


On Sun, 22 Dec 2002 02:05:19 -0600
Scott <syrinx@simplecom.net> wrote:

> How do I detect a zero-length tcp packet?  recv() doesn't seem to work
> for this.  I think I'm missing something obvious.  TNX.

Let me clarify.  I'm looking for a server to "ping" me.  He's not going
to send any data at all.  Just a blank tcp packet (the header, which, I
think, is between 20 and 60 bytes).  How do I detect such a packet in
python?  Do I have to use server mode (listen() instead of receive()) ?