Solved

detecting disconnection of Winsock control in Visual basic

Posted on 2003-11-21
5
243 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video teaches viewers about errors in exception handling.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

809 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