url
(String) (默认为 window.location
)options
(Object)forceNew
(Boolean) 是否重用现有连接Socket
管理器
,并尝试在后续调用中重用现有的管理器
,除非用false
传递多路复用
选项。传递此选项等同于传递force new connection:true
或forcenew:true
。Socket
实例,默认为/
。例如,如果url
为http://localhost/users
,则将建立到http://localhost
的传输连接,并将建立到/users
的socket.io连接。