title: TCP socket server
body: <pre><code>Active Internet connections (w/o servers)
  Prot Rec Sen Local Address        Foreign Address     State       PID/PXX
  tcp  1   0   192.169.3.120:64007  192.169.3.104:40968 CLOSE_WAIT  -               
  tcp  7   0   192.169.3.120:64007  192.169.3.104:44637 CLOSE_WAIT  -               
  tcp  17  0   192.169.3.120:64007  192.169.3.104:39950 CLOSE_WAIT  -               
  tcp  7   0   192.169.3.120:64007  192.169.3.104:34229 CLOSE_WAIT  - 
  </code></pre>
  
  <p>The above response is from <code>sudo netstat -p</code>.</p>
  
  <p>I have a application sample server which has clients connected. then i stopped the application and started it again it says errror in binding as i didnt use SO_REUSEADDR. i saw that there are few clinet connection in close_wait. i saw that that we need to close the processid of that particular socket. but netstat -p gives blank process id. so how to kill this process as well as is there any way to kill all sockets (exclusively all) using c apis. </p>