Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 412 Bytes

new_server_port_options.md

File metadata and controls

18 lines (14 loc) · 412 Bytes

new Server(port[,options])

  • prot(Number) 监听的端口(创建新的http.server)

  • options(object)

请参阅上面的可用选项列表。

const io=require('socket.io')(3000,{
    path:'/test',
    serverClient:false,
    // 下面是 engine.IO的选项
    pingInterval:10000,
    pingTimeout:5000,
    cookie:false
})