473,385 Members | 2,243 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,385 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 6714
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.