|
-
Jun 7th, 2008, 09:36 AM
#1
Thread Starter
Addicted Member
TCP Connection Status
Hi:
I'm trying to find out if anyone know how to check the current status of TCP connection? I'm using C#.
If I have a TCPclient waiting to connect to a TCPlistener, half way during the connection, somehow the connection dropped or Tcplistener having a problem or accidentally shut down, how would i know the TCPclient status is the latest? I could not use TCPclient.connected status as it is only true for connection for the first time. If I used Socket.connected, it is the same as TCPclient.connected.
Can some one tell me how to do this? VB6 winsocks always provided the winsock connection status. how about .NET?
Thanks
-
Jun 8th, 2008, 01:05 PM
#2
Re: TCP Connection Status
I'm not sure I understand your question. What status are you looking to retrieve? The Connected property tells you if it is connected or not, but since that is not enough...what are you missing?
-
Jun 9th, 2008, 08:59 AM
#3
Thread Starter
Addicted Member
Re: TCP Connection Status
 Originally Posted by Atheist
I'm not sure I understand your question. What status are you looking to retrieve? The Connected property tells you if it is connected or not, but since that is not enough...what are you missing?
Ah, Yes, Have you ever try this:
a) Let both Client and Server connected.
b) Then Shut the Server down.
c) The Client.Connected property will stayed True. Which is not correct.
I tried many many times. That why I asked this question. If you compared with VB6, I can verify the current connection status continously.
May be I'm wrong. Can you share how you managed the status in C#?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|