D
D. Wichert
Hi folks,
I use a TcpClient object to connect to a local (asynchron) socket server.
Once the connection is established, I ask every second if there is a new
entry in the socket queue.
If the connection was established successfully at the beginning and ends for
some reason after a certain time, I have to reconnect to the socket server.
So, what I need therefore is a TcpClient attribute such as "Connected" that
returns true if connection is still available, otherwise false.
I read some examples on the internet with TcpClients where an attribute
"Connected" is used, but it does not belong to the TcpClient Class (maybee
it has been removed in the last .NET framework).
There is also an attribute "Active" that only tells you if the connection
has been established at the beginning, but does not track the connection
state.
How can I solve this problem?
Thanks for any help!!
Best regards,
David
I use a TcpClient object to connect to a local (asynchron) socket server.
Once the connection is established, I ask every second if there is a new
entry in the socket queue.
If the connection was established successfully at the beginning and ends for
some reason after a certain time, I have to reconnect to the socket server.
So, what I need therefore is a TcpClient attribute such as "Connected" that
returns true if connection is still available, otherwise false.
I read some examples on the internet with TcpClients where an attribute
"Connected" is used, but it does not belong to the TcpClient Class (maybee
it has been removed in the last .NET framework).
There is also an attribute "Active" that only tells you if the connection
has been established at the beginning, but does not track the connection
state.
How can I solve this problem?
Thanks for any help!!
Best regards,
David