Disconnected socket still connected! - What then?

G

Guest

Hi, I have synchronous communications between a server and client. To save bandwith the connection must persist. So the socket must stay open and only be re-opened in case of communications failure. To simulate failure, the server disconnects the socket. However, the client socket parameter shows an open socket: socket.connected is true, socket. Active is true, socket.poll(1,selectRead) is true. When checking the MS class documentation, it is stated that socket.connected reflects the LAST status of the socket. So far, I have come accross many other programmers having the same problem. Some suggested of using the exceptions errors. But when connecting to a socket which is still open (according to VB.Net) while having the plug pulled out, the excpetion error one gets is, guess.......................Trying to connect on an open socket!! Have anyone found a way out yet? (That is appart from using other objects not designed in .NET)
 
B

Bismark Prods

And trying pinging with frequent intervals ? to verify the real status of
your socket ?

Bismark

Techsol said:
Hi, I have synchronous communications between a server and client. To save
bandwith the connection must persist. So the socket must stay open and only
be re-opened in case of communications failure. To simulate failure, the
server disconnects the socket. However, the client socket parameter shows an
open socket: socket.connected is true, socket. Active is true,
socket.poll(1,selectRead) is true. When checking the MS class documentation,
it is stated that socket.connected reflects the LAST status of the socket.
So far, I have come accross many other programmers having the same problem.
Some suggested of using the exceptions errors. But when connecting to a
socket which is still open (according to VB.Net) while having the plug
pulled out, the excpetion error one gets is,
guess.......................Trying to connect on an open socket!! Have
anyone found a way out yet? (That is appart from using other objects not
designed in .NET)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top