'connect' 事件

每当客户端发送 HTTP CONNECT 请求时触发。 如果该事件未被监听,则发送 CONNECT 请求的客户端会关闭连接。

当该事件被触发后,请求的 socket 上没有 'data' 事件监听器,这意味着需要绑定 'data' 事件监听器,用来处理 socket 上被发送到服务器的数据。

Emitted each time a client requests an HTTP CONNECT method. If this event is not listened for, then clients requesting a CONNECT method will have their connections closed.

After this event is emitted, the request's socket will not have a 'data' event listener, meaning it will need to be bound in order to handle data sent to the server on that socket.