By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,341 Members | 1,407 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,341 IT Pros & Developers. It's quick & easy.

Disconnected socket still connected! - What then?

P: n/a
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)
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
And trying pinging with frequent intervals ? to verify the real status of
your socket ?

Bismark

"Techsol" <an*******@discussions.microsoft.com> a écrit dans le message de
news:28**********************************@microsof t.com...
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)
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.