Is socket connected?

How to determine in an asynchronous manner that a socket is still connected or not?

I would like to have such a function:
bool isSocketConnected(int sid); // nonblocking function

Where should I look at to find that the connection were closed by peer.
I tried with select(), getsockopt( SO_ERROR ) , but I was not really successful.

Any idea?

Armand

We are having the same problem here. Did you ever find a solution?

“Armand Ciejak” <armand.ciejak@free.fr> wrote in message
news:dn9loc$p7v$1@inn.qnx.com

How to determine in an asynchronous manner that a socket is still
connected or not?

I would like to have such a function:
bool isSocketConnected(int sid); // nonblocking function

Where should I look at to find that the connection were closed by peer.
I tried with select(), getsockopt( SO_ERROR ) , but I was not really
successful.

Any idea?

Armand