workerman icon indicating copy to clipboard operation
workerman copied to clipboard

ssl secure connection

Open phrazer opened this issue 3 months ago • 1 comments

https://github.com/walkor/workerman/blob/e6162ad4c170113f62732d814a5fd4103436b565/src/Worker.php#L2314

may i ask, why do you disable encryption on the stream, if transport is ssl? or am I missing something? I see you enable it in tcp again, is it because of udp not supporting ssl?

https://www.php.net/manual/en/function.stream-socket-enable-crypto.php

phrazer avatar Mar 15 '24 08:03 phrazer

The default SSL handshake process in PHP is blocking, so we have disabled it and will attempt to enable SSL handshake with stream_socket_enable_crypto only when there is data available on TCP.

walkor avatar Mar 15 '24 15:03 walkor