[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

detecting disconnection of Winsock control in Visual basic

I have been using wisock control for soemtime but I have discovered that there exists a problem . If you have a client winsock that is connected to a remote server, then you remove the network connection the client will still show that it is connected. Is there a way I can be able to detect that the connection does not exist, such that I can display the real status of the connection.
0
albertkimani
Asked:
albertkimani
1 Solution
 
cookreCommented:
Just imagine how much more traffic there would be if every X time interval every connected port in the world asked the other end if they were still there!

It's up to you to decide a timeout for your connections.

0
 
anaadoulCommented:
use Winsock1_Close Event

Private Sub Winsock1_Close()
   Winsock1.Close
End Sub

hope it help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now