Does php5.2.9 support websocket?
伊谢尔伦
伊谢尔伦 2017-05-16 13:11:35
0
1
530

Does php5.2.9 support websocket? How to check and where can I find it? Thank you

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
PHPzhong

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template