walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.17k stars 2.27k forks source link

Moved WebSocket connection callback to proper place after handshake. #1054

Closed akotulu closed 2 months ago

akotulu commented 2 months ago

Moved callback after handshake to be able to send custom 3000-4999 status codes to client inside callback.

walkor commented 2 months ago

Sometimes we need to send custom HTTP headers to the client while handling WebSocket requests, but if this PR is merged, such a feature will not be supported.