> For the complete documentation index, see [llms.txt](https://socket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://socket.gitbook.io/docs/4-fu-wu-duan-apiserverapi/4.1-server/server_onconnection_socket.md).

# 4.1.15 服务器连接socket server\_onconnection\_socket

* `socket`(engine.Socket)
* **Returns** `Server`&#x20;

仅限高级使用。从传入的engine.io（或兼容的api）`Socket` 创建新的`socket.io`客户端。
