title: Transport endpoint is not connected
body: <p>My code is this but not working    </p>
  
  <pre><code>&lt;?php
      $sock = socket_create(AF_INET, SOCK_STREAM, 0);
      $sk = socket_connect($sock,"10.0.1.43","1234");
      socket_set_nonblock($sock);
  
      while (1) {        
          sleep(2);
          $buffer=socket_read($sock,512);
          echo "Buffer = $buffer \n";
          echo "Last Error = ".socket_last_error($sock).socket_strerror(socket_last_error($sock))."\n";        
      }        
  ?&gt;
  </code></pre>
  
  <p>It display error:</p>
  
  <p>unable to read from socket [107]: Transport endpoint is not connected 
  PHP Stack trace:
  Buffer =<br>
  Last Error = 107Transport endpoint is not connected</p>
  
  <p>Thanks</p>