跳到主要内容

listen

开启websocket的监听

声明

bool listen(int port, bool reuse_addr)

参数

参数名描述
port监听端口
reuse_addr是否允许复用端口

返回值

true-成功/false-失败

使用方式

返回文档