[icq-devel] Newcomer

Starman fm.grattepain at wanadoo.fr
Sat Nov 30 10:35:29 CET 2002

On Saturday, November 30, 2002, at 09:43 AM, Christophe Minguet 
(freesurf) wrote:

> I had such problem ....
> Cause e can't know if a socket is closed ...
> Use the KEEPALIVE channel 5 packet :
> 2a 05 00 15 00 00
> 2a //byte, constant, flap magic
> 05 //byte, constant, flap channel
> 00 15 //word, variable, flap sequence number
> 00 00 //word, constant, flap data length
> Send it periodically, you should get a socket error if u send to send
> this packet and you are disconnected from serveur.

Thanks. I already implemented it. But sometimes, I'm not connected 
anymore to the server, but I don't get any error. If I use netstat in 
my term, I see that the status of my socket is still connected, but the 
server never answers to my packets: no ack, no reply, nothing... It 
happens for example when I put my computer into sleep for some time (30 
mn, 1h, ..., I haven't checked this). Yet, I test the connection by 
doing a contact search on the server every minute: If it answers within 
the minute, it's ok, else, I supposed I am not connected. It works fine 
if the network connection is reliable, but sometimes, I can get 
disconnected without any reason (bad connection...). And it generates 
traffic :(


More information about the icq-devel mailing list