title: ZMQ getsocket method
body: <p>What is the purpose of getSocket(type,persistence_id,callback) in zeromq?</p>
  
  <p>Will it create a new socket if one doesn't exist with the same persistence_id in the context?</p>
  
  <p>This is my client</p>
  
  <pre class="lang-php prettyprint-override"><code>function newSocket(ZMQSocket $soc, $pid)    {
      echo $pid;
  }
  
  $context = new ZMQContext();
  
  $socket = $context-&gt;getSocket(ZMQ::SOCKET_PUSH, 'mysocket', 'newSocket');
  
  $socket-&gt;setSockOpt(ZMQ::SOCKOPT_HWM,5);
  
  $socket-&gt;connect("tcp://172.16.136.59:5555");
  for($i=0;$i&lt;10;$i++)
  {
      var_dump($socket-&gt;send("hai",ZMQ::MODE_NOBLOCK));
      sleep(2);
  }
  </code></pre>
  
  <p>How many ever times I run this client simultaneously[nth client after n-1th client started], the callback is getting executed.
  Is this the desired behavior?
  What are all the situations, where the socket structure will be reused?</p>