O
oshaer
Hi Everybody
I need to write a code that forcibly closes connections that are in
CLOSE_WAIT status. It should run at a father process and constantly
check the forked child processes(servers). I need this code to work on
Unix/Linux, thus usage of WINAPI is not possible.
My question is:
1) Should I use netstat through code and parse the result to learn
which socket is in a CLOSE_WAIT situation?
2) Is there any C++ code that enables me to easily get socket status,
given the file descriptor number?
3) If you have any other ideas/recommendations please share.
Thanks a lot.
Ofira.
I need to write a code that forcibly closes connections that are in
CLOSE_WAIT status. It should run at a father process and constantly
check the forked child processes(servers). I need this code to work on
Unix/Linux, thus usage of WINAPI is not possible.
My question is:
1) Should I use netstat through code and parse the result to learn
which socket is in a CLOSE_WAIT situation?
2) Is there any C++ code that enables me to easily get socket status,
given the file descriptor number?
3) If you have any other ideas/recommendations please share.
Thanks a lot.
Ofira.