title: How do I pool socket connections?
body: <p>I have a Win32 application server that communicates with its clients through its own protocol over TCP. I need to call some functions of this app server from PHP.</p>
  
  <p>I open a socket, establish communication with the server, write a request to the socket, receive an answer, and close the socket. To get better performance I want to make a pool of connections to the app server.</p>
  
  <p>How do I make a pool of connections (pool of sockets) in PHP?</p>