示例#1
0
 /**
  * {@inheritdoc}
  */
 protected function prepareSocket(StreamSocket $socket)
 {
     $socket->block(true);
     if (false === stream_socket_enable_crypto($socket->getRaw(), true, STREAM_CRYPTO_METHOD_SSLv23_SERVER)) {
         throw new Exception('SSL negotiation failed');
     }
     $socket->block(false);
 }
示例#2
0
 /**
  * @param StreamSocket $socket
  */
 protected function prepareSocket(StreamSocket $socket)
 {
     $socket->block(false);
 }