473,401 Members | 2,127 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,401 software developers and data experts.

How to detect a remote socket termination?

I have my socket program working...I can send & receive data, I can
terminate the connection, etc.

But I can't figure out how to tell if the remote client has disconnected. I
tried using Socket.Connected but it continues to return TRUE even when the
remote client has closed the connection.

Please help!

Thanks,
Terry
Nov 21 '05 #1
6 1440
Before somebody starts finding the solution again.
Nov 21 '05 #2
Ok where is it? I have searched this group and can't find any other
reference to this.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:ug****************@TK2MSFTNGP12.phx.gbl...
Before somebody starts finding the solution again.

Nov 21 '05 #3
This was the answer from Tom,
---------------------------------
Without an exahustive look at your code... My suggestion is to look at
using async sockets. They are a little more difficult to code for, but
are much more efficient...

Here is a good place to start for .NET sockets:
http://msdn.microsoft.com/library/de...consockets.asp

--------------------------------------------------
Nov 21 '05 #4
That was the answer for a question in another thread.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2********************@TK2MSFTNGP10.phx.gbl.. .
This was the answer from Tom,
---------------------------------
Without an exahustive look at your code... My suggestion is to look at
using async sockets. They are a little more difficult to code for, but
are much more efficient...

Here is a good place to start for .NET sockets:
http://msdn.microsoft.com/library/de...consockets.asp

--------------------------------------------------

Nov 21 '05 #5
Terry,

And does that than not fit for this question as well?

Cor
Nov 21 '05 #6
Nevermind, sorry I asked...

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Terry,

And does that than not fit for this question as well?

Cor

Nov 21 '05 #7

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

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
1
by: Graham | last post by:
Can anyone tell me how to detect when a client socket connection has failed (ie remote equipment power failure) using VB.net. Thanks in advance
5
by: Morten | last post by:
How do I detect if a client socket is no longer connected to the listen tcp socket ? I have tried with (just an example): --------------------- Socket tcpSocket; ...
4
by: Frank Meng | last post by:
Hi. I am trying a csharp sample from http://www.codeproject.com/csharp/socketsincs.asp . (Sorry I didn't post all the source codes here, please get the codes from above link if you want to try)....
3
by: Szafranr | last post by:
Hi I have application where I used tcpListener to connect with another system. Every thing is ok that it's time to error handling and I have problem when the TCP client is disconect I don't...
4
by: Chris Johnson | last post by:
Hey all, I have a small app I have developed that periodically pings a list of server and returns their status. Given my environment I have setup the program such that a server can be down 4...
0
by: =?Utf-8?B?RGllZ28=?= | last post by:
The Connected property of the Socket class does not return false when the Socket no longer is connected to the host connection. Is there another way to verify that the Socket is disconnected? tnx
3
by: =?GB2312?B?zPC5zw==?= | last post by:
Howdy, all, I want to use python to detect the accessibility of website. Currently, I use urllib to obtain the remote webpage, and see whether it fails. But the problem is that the webpage may be...
0
by: AlannY | last post by:
Hi there. I'm writing a tool, which must detect is connection was terminated on remote side. Every action on network, I'm fetching with select(). And I want in some place check if connection still...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.