Does php5.2.9 support websocket? How to check and where can I find it? Thank you
PHPz2017-05-16 13:13:35
Supported
First understand the Websocket implementation principle before asking this question.
WebSocket is an independent protocol built on TCP.
Websocket performs handshake via 101 status code of HTTP/1.1 protocol.
So to support websocket, you need to support both HTTP and TCP protocols. The HTTP protocol can be implemented by conventional servers such as nginx/apache. Then you need to support TCP, that is, you need to create a socket.
socket_create() supports socket creation starting from 4.1
stream_socket_server() supports starting from 5