Solved

detecting disconnection of Winsock control in Visual basic

Posted on 2003-11-21
5
242 Views
Last Modified: 2013-11-13
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
Comment
Question by:albertkimani
5 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 50 total points
ID: 9797227
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
 
LVL 1

Expert Comment

by:anaadoul
ID: 9800591
use Winsock1_Close Event

Private Sub Winsock1_Close()
   Winsock1.Close
End Sub

hope it help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This is an explanation of a simple data model to help parse a JSON feed
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now