[Tutor] Re: socket question

Scott syrinx@simplecom.net
Wed Dec 25 01:05:02 2002


> > Let me clarify.  I'm looking for a server to "ping" me.  
> > to send any data at all.  Just a blank tcp packet 
> Umm, if its literally ping then you won't get tcp at all. 
> ping doesn't use tcp it uses another IP protocol called ICMP.

I guess it wouldn't hurt to explain what I'm actually trying to do.  :)

I'm playing around with the yahoo messenger protocol, trying to figure
out how to get a yahoo webcam viewer to work under linux.

I'm sorry I used the word "ping."  Because I didn't mean that literally.
 What I meant is that sometimes the yahoo server will send what I called
a zero-length tcp packet, which is just a tcp header with no data
attached to it.  I assume it's the server's way of saying "Hey I got the
packet you sent, now I'm ready for more."  I know these are tcp packets
because I've examined them under ethereal and a couple of other packet
sniffers.

It seems that if I use socket.recv() and it's one of these empty
packets, my program hangs waiting for the data, which doesn't exist. 
I'm pretty sure I'm doing something wrong, but can't figure out what.