Operating System - HP-UX
1832695 Members
2936 Online
110043 Solutions
New Discussion

TCP client - server question

 
Wojtek Dudczak
Occasional Contributor

TCP client - server question

Hi All,

I do not know how to check if my program (TCP client written in C) is still connected to the TCP server running on a other machine. In other words if server is still running. In my situation server does not send any "keep alive" messages. For example NETSTAT utility shows column named (state). Which function can I use to get state of the connection?

Many thanks.
1 REPLY 1
V. V. Ravi Kumar_1
Respected Contributor

Re: TCP client - server question

hi,

may be lsof is useful in this case.

#lsof -i tcp

regds
Never Say No