icq-list-oWUpAQCWC2r4 at ruediger-kuhlmann.de
Sat Nov 30 13:02:10 CET 2002
>--[Christophe Minguet (freesurf)]--<c.minguet at freesurf.fr>
> His only way to know he is disconnected seems to be to write on the
> socket ...(KEEPALIVE)
Correct. Because if the other side considers the the connection closed, it
won't acknowledge packets sent but but refuse them (like resetting the
> I don't remember in C ... But in java you can't know a socket is closed
> on the other side when u try to read it, only way is to write in it.
Actually you can have a connection open for a long time without actually
having a connection, As long as no side actually tries to send something. So
Flap(5) is the way to go. You might even use a timer and check whether you
haven't received something for n minutes, and if not, re-send your status,
and if you then still don't receive anything (like: the status of everyone
on your contact list), the connection is somewhat ill.
100 DM = 51 € 13 ¢.
100 € = 195 DM 58 pf.
mailto:ruediger at ruediger-kuhlmann.de
More information about the icq-devel