TCP/IP Question

Hi,

I am developing a simple tcp client application. Once the socket is created
and connected (using connect function) the program keep sending a specific
string size (using write funtion) from time to time. The question regarding
this situation is how can I handle when some innocent hand unplug the
ethernet cable from the switch?. How can I avoid my progam breaks?.

Thanks for any idea you may have.

Oscar E. Soto

Control Adaptable SA de CV

Tel:+ 52 (81) 8399-0183
Fax:+ 52 (81) 8399-0162
Cel: +52 (81) 8396-6327

try “signal (SIGPIPE, SIG_IGN);”

Then read will return an error.

“Oscar E. Soto” <osoto@att.net.mx> wrote in message
news:dc46nh$81o$1@inn.qnx.com

Hi,

I am developing a simple tcp client application. Once the socket is
created
and connected (using connect function) the program keep sending a
specific
string size (using write funtion) from time to time. The question
regarding
this situation is how can I handle when some innocent hand unplug the
ethernet cable from the switch?. How can I avoid my progam breaks?.

Thanks for any idea you may have.

Oscar E. Soto

Control Adaptable SA de CV

Tel:+ 52 (81) 8399-0183
Fax:+ 52 (81) 8399-0162
Cel: +52 (81) 8396-6327