Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How To Detect a Closed Server Socket

0 views
Skip to first unread message

Vikram V. Jahagirdar

unread,
Oct 23, 2002, 6:27:33 AM10/23/02
to
Hi,

I am facing a problem while detecting whether a socket is closed
(other side).
My application connects to a server socket which listens. After a
while, when the server socket closes, I want to know before sending
any data, whether the socket is closoed or not.

My assumption is i have to use the select() call. But select is always
returning me 1 which meanns that the server socket is ready for
reaceing data. (which in fact has closed).

How do i go about this ?

I dont wish to send any data if the server socket is closed.

Regards.

Vikram

0 new messages