コード例 #1
0
 /**
  * Check whether given socket should be disconnected
  *
  * @param SocketInterface $socket Socket object
  *
  * @return bool
  */
 private function isDisconnectRequired(SocketInterface $socket)
 {
     return $socket instanceof PersistentClientSocket && (feof($socket->getStreamResource()) !== false || !stream_socket_get_name($socket->getStreamResource(), true)) || !$socket instanceof PersistentClientSocket;
 }
コード例 #2
0
 /** {@inheritdoc} */
 public function getStreamResource()
 {
     return $this->socket->getStreamResource();
 }