Hi. I have an array of sockets in my application and i need to know which sockets are connected and which ones aren't. In order to do that i check if the socket equals INVALID_SOCKET or NULL, but i don't know how efficient that is.
I wondered how can i know if some of the connected sockets loses the connection from the other side for any reason. Something like the events in the CAsyncSocket, or probably some function that can check just that, if the socket is connected or not. I know i can send data to the other side and check for error, but i wouldn't go for it if there's a cleaner way.
My application is MFC dialog application and i use blocking raw SOCKET's.
Thanks in advance
I wondered how can i know if some of the connected sockets loses the connection from the other side for any reason. Something like the events in the CAsyncSocket, or probably some function that can check just that, if the socket is connected or not. I know i can send data to the other side and check for error, but i wouldn't go for it if there's a cleaner way.
My application is MFC dialog application and i use blocking raw SOCKET's.
Thanks in advance
Comment