Skip to content

Websocket实时通信

🍓端口号

partcontent
url/system/dictType
methodGET
JS
// params(请求端口地址)
'ws://127.0.0.1:3000/',

// response(响应参数)
//首次连接
{
    "type": "success",
    "data": "欢迎连接 WebSocket"
}

//后续连接
{
    "type": "success",
    "data": "连接状态保持中..."
}


//类型以及对应消息类型
{label:'系统提示 ',value:'success'},
{label:'聊天信息',value:'chatmsg'},
{label:'系统公告',value:'info'},
{label:'用户求助',value:'warn'},

Released under the MIT License.