TCP programming connect problem

TCP programming connect problem

Post by James Tal » Fri, 24 Jun 1994 23:14:27

I am having a problem with a client-server app that I am developing.  The
problem is that I have a TCP connection between the two of them and the
program gets into a state that the server is blocked trying to write to the
client and the client turns off his computer.  As a consequence, the server
sits on the write() system call forever.  I want to know why the server is
not notified with an error return that the client has broken the connection.

I would greatly appreciate any help that anyone can give me.

(P.S. I have already tried SO_KEEPALIVE to no avail)


Don't Pay Attention To The Police Box Flying By


1. Problem on TCP connect time?

Using C to write my application and this is my problem.

Having a problem when the remote PC, isn't turned on, or network cable is
disconnected, the "connect" call, seems to just hang there forever.

It appears to be the TCP_KEEPALIVE timer defaults to some ugly time of 2
hours or whatever that I have read.

I can't change this, because my application is running on someone else Unix
system and this is not an option to change.

My question is, what can I do for a work around to get out of the connect
call when this happens?

Since, I'm using C, would like to see an example if possible or direct me to
some doc to show me how.

BTW: my app works well as long as the PC is up and running and is on the
network. I can detect then when the server is up or down. It just, that I
can't with the PC being disconnected from the network.

Thanks for your help.

2. Server info

3. Problem with TCP nonblocking connects

4. Text output formating

5. need recommendation for good TCP\IP program and Terminal Program for FREEBSD 2.2.6

6. What is the best(easiest) GUI developing tool for a newbie?

7. Problem on TCP connect time?

8. A thought about DR-DOS

9. problem with tcp connect (reset by peer), shows different in linux and windows?

10. TCP connect problems over PPP

11. Problem using "connect" to establish TCP client connection

12. Problem on TCP connect time?