How to determine terminated TCP connection in Linux?
From: Alexander Baranov (baranov_at_intech21.com)
Date: 09/24/04
- Next message: Paul Carpenter: "Re: Using USB instead of RS232 on embeded project"
- Previous message: Jeffrey A. Wormsley: "Re: Using USB instead of RS232 on embeded project"
- Next in thread: Bryan Hackney: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Bryan Hackney: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Neil Cherry: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Kevin D. Quitt: "Re: How to determine terminated TCP connection in Linux?"
- Reply: FLY135: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Steve Schefter: "Re: How to determine terminated TCP connection in Linux?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Sep 2004 10:47:53 -0400
Hi, All.
I am a new Linux programmer.
I made a Linux TCP server for control applications. When some TCP client
connects to it, goes into infinite console loop, getting characters, echoing
them to client, parsing commands etc. Everything is OK until the client
unexpectedly terminates the connection. I have to detect this event inside
the loop and break. I thought that it might be done by analyzing socket
state (i.e. if the state is not ESTABLISHED - break the loop) but from
various examples and HOWTOs I did not see how to do it. It seems that I have
to solve this problem in different way.
Can anybody criticize and prompt?
Regards, Alex.
- Next message: Paul Carpenter: "Re: Using USB instead of RS232 on embeded project"
- Previous message: Jeffrey A. Wormsley: "Re: Using USB instead of RS232 on embeded project"
- Next in thread: Bryan Hackney: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Bryan Hackney: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Neil Cherry: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Kevin D. Quitt: "Re: How to determine terminated TCP connection in Linux?"
- Reply: FLY135: "Re: How to determine terminated TCP connection in Linux?"
- Reply: Steve Schefter: "Re: How to determine terminated TCP connection in Linux?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|