windows下,證書是正確的,用nginx代理可以正常使用;workerman版本是3.3.8;php是5.6.8,開啟了openssl。
客戶端連接時(shí),報(bào)
exception 'Exception' with message 'ssl handshake fail, stream_socket_enable_crypto return 0' in WorkerMan\workerman\Connection\TcpConnection.php:394
請(qǐng)問,這個(gè)要怎么解決?
有沒有改動(dòng)過workerman源碼?
看到php手冊(cè)說只有非阻塞的socket stream_socket_enable_crypto才會(huì)返回0,
但是開啟ssl的時(shí)候socket是阻塞的,按照手冊(cè)不可能返回0.
還有就是客戶端到服務(wù)端的網(wǎng)絡(luò)延遲如何?看下php日志這一行有沒有其它的waring?
@1:還是不行,我用workerman試了一下,還是報(bào)exception 'Exception' with message 'ssl handshake fail, stream_socket_enable_crypto return 0' ,能給我一個(gè)demo試試嗎?
代碼都不一樣了,不會(huì)報(bào)這個(gè)錯(cuò)了,應(yīng)該是你/Connection/TcpConnection.php沒替換成功,或者替換了沒重啟
@1:上面的錯(cuò)誤是workerman的TcpConnection.php沒替換的結(jié)果,替換了的,報(bào)這個(gè)錯(cuò)誤
exception 'Exception' with message 'SSL handshake fail ' in D:\Program Files\Apa
che2.2.25\htdocs\workerman\workerman-for-win-master\workerman\Connection\TcpConn
ection.php:398