473,231 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

TCPClient And Disconnect

Anyone got solution for detecting if the TCPclient is disconnected?
i have "googled" and almost found nothing, i'm using .NET Framework V1.1.
they said to use Poll method, but there is no such method in TCPClient. If
possible i would like to get some code example for this.

Regards,

--
Simpleware Solution
:: Simple is Everything, Nothing is Complex ::
Jan 10 '06 #1
2 6707
Public Class TCP
Inherits System.Net.Sockets.TcpClient
Public ReadOnly Property Disconnected() As Boolean
Get
Return Me.Client.Connected()
End Get
End Property

End Class

"Freddy Setiawan" <Fr************@discussions.microsoft.com> wrote in
message news:5C**********************************@microsof t.com...
Anyone got solution for detecting if the TCPclient is disconnected?
i have "googled" and almost found nothing, i'm using .NET Framework V1.1.
they said to use Poll method, but there is no such method in TCPClient. If
possible i would like to get some code example for this.

Regards,

--
Simpleware Solution
:: Simple is Everything, Nothing is Complex ::

Jan 10 '06 #2
Oops...change Disconnected to Connected

"Rocky" <no*****@nowhere.com> wrote in message
news:eT*************@TK2MSFTNGP14.phx.gbl...
Public Class TCP
Inherits System.Net.Sockets.TcpClient
Public ReadOnly Property Disconnected() As Boolean
Get
Return Me.Client.Connected()
End Get
End Property

End Class

"Freddy Setiawan" <Fr************@discussions.microsoft.com> wrote in
message news:5C**********************************@microsof t.com...
Anyone got solution for detecting if the TCPclient is disconnected?
i have "googled" and almost found nothing, i'm using .NET Framework V1.1.
they said to use Poll method, but there is no such method in TCPClient.
If
possible i would like to get some code example for this.

Regards,

--
Simpleware Solution
:: Simple is Everything, Nothing is Complex ::


Jan 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christopher H. Laco | last post by:
I'm having a problem with the TcpClient that I can only conclude is either a feature, or a complete misunderstanding of the docs on my part. In a nutshell, I'm simply performing the following...
0
by: Hawk Wu via DotNetMonster.com | last post by:
Hello, I have odd problem. When I close my application wait around 5 minute. The pocket of screen will show one message "System.Net.Sockets.Tcpclient" of message box. My source code as below. ...
0
by: amita | last post by:
I have a Client (a TcpClient object) established connection with the Server(a TcpListener). I want that when the Server goes down, the TcpClient detects this disconnection and when the Server is back...
6
by: Claire | last post by:
When i close a client connection by using System.Net.Sockets.TcpClient.Close() method it remains open and viewable with netstat -an. public void Disconnect() { if (myClient == null) return;...
1
by: Frank | last post by:
I wonder if anyone could give me a suggestion on how to best handle this scenario. I wish to have an aspx page contact a server and receive messages. Initially, a login messge is sent, then...
1
by: Frank | last post by:
I wonder if anyone could give me a suggestion on how to best handle this scenario. I wish to have an aspx page contact a server and receive messages. Initially, a login messge is sent, then...
1
by: WildBill | last post by:
I am using a tcpclient and a network stream to communicate with the TCP port on a printer for testing the printer firmware. The code I have works perfectly the first time I run it. The printer...
10
by: Zytan | last post by:
I have a TcpClient. I set the read/write timeouts at 1 minute (in milliseconds). I get a NetworkStream from it and confirm the timeouts still exist. I do a NetworkStream.Write() and then a...
2
by: Zytan | last post by:
I just had the problem occur again, with NetworkStream.Write() doing its thing with a timeout... and it just sits and waits and waits and waits... it never times outs. So, I shut the server down...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.