Solved

detecting disconnection of Winsock control in Visual basic

Posted on 2003-11-21
5
237 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
Comment Utility
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
Comment Utility
use Winsock1_Close Event

Private Sub Winsock1_Close()
   Winsock1.Close
End Sub

hope it help
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
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.

762 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

10 Experts available now in Live!

Get 1:1 Help Now