/** * {@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); }
/** * @param StreamSocket $socket */ protected function prepareSocket(StreamSocket $socket) { $socket->block(false); }