[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

How do I check if a TcpClient is active ??

Alexander Bierbrauer

1/20/2003 12:05:00 AM

Hi people,

I hope this is the right newsgroup for my question. I'm
writing a small testing application with the TcpClient class.

Everything works ok, but I wanted to know if a TcpClient is
active or not(e.g. the other client closes the connection)..
but I don't find a proper method for my problem. I think
I'm too blind to find the solution.. any help would be great !

thanx in advance,

alexander bierbrauer
1 Answer

Kumar Gaurav Khanna

1/20/2003 9:34:00 AM

0

Hi!

You can consider checking the state of the underlying Socket object by
referring to the Socket's Connected property. Ofcourse, you will have to
derive a class from TcpClient since the underlying Socket can be
attained from the Client property by inheriting from TcpClient.

Alexander Bierbrauer wrote:
> Hi people,
>
> I hope this is the right newsgroup for my question. I'm
> writing a small testing application with the TcpClient class.
>
> Everything works ok, but I wanted to know if a TcpClient is
> active or not(e.g. the other client closes the connection)..
> but I don't find a proper method for my problem. I think
> I'm too blind to find the solution.. any help would be great !
>
> thanx in advance,
>
> alexander bierbrauer


--
Regards,
Kumar
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
-----------------------------------------------------------------------------
WinToolZone - Spelunking Microsoft Technologies @
http://www.wintoo...