IM/doc_api/socket_api.json

291 lines
6.8 KiB
JSON

{
"generatedAt": "2026-04-29T16:33:59.996Z",
"transport": "socket.io",
"entryFile": "src/socket/index.js",
"serverEventEnumFile": "src/socket/event/server_event.js",
"clientEventEnumFile": "src/socket/event/client_event.js",
"inboundEvents": [
{
"event": "connection",
"key": "connection",
"description": "socket连接",
"handlerFile": "",
"handlerFunction": "",
"params": [],
"emits": []
},
{
"event": "disconnect",
"key": "disconnect",
"description": "socket断开连接",
"handlerFile": "src/socket/handler/disconnect.js",
"handlerFunction": "disconnect",
"params": [],
"emits": [
"exit"
]
},
{
"event": "offer",
"key": "offer",
"description": "webrtc offer",
"handlerFile": "src/socket/handler/rtc/offer.js",
"handlerFunction": "offer",
"params": [],
"emits": [
"offer"
]
},
{
"event": "answer",
"key": "answer",
"description": "webrtc answer",
"handlerFile": "src/socket/handler/rtc/answer.js",
"handlerFunction": "answer",
"params": [],
"emits": [
"answer"
]
},
{
"event": "candidate",
"key": "candidate",
"description": "webrtc candidate",
"handlerFile": "src/socket/handler/rtc/candidate.js",
"handlerFunction": "candidate",
"params": [],
"emits": [
"candidate"
]
},
{
"event": "count",
"key": "count",
"description": "在线人数",
"handlerFile": "src/socket/handler/count.js",
"handlerFunction": "count",
"params": [],
"emits": [
"count"
]
},
{
"event": "exit",
"key": "exit",
"description": "退出",
"handlerFile": "src/socket/handler/exit.js",
"handlerFunction": "exit",
"params": [],
"emits": [
"exit"
]
},
{
"event": "createAndJoin",
"key": "createAndJoin",
"description": "加入/创建房间",
"handlerFile": "",
"handlerFunction": "",
"params": [],
"emits": []
},
{
"event": "heartbeat",
"key": "heartbeat",
"description": "心跳",
"handlerFile": "src/socket/handler/heartbeat.js",
"handlerFunction": "heartbeat",
"params": [],
"emits": [
"heartbeat"
]
},
{
"event": "channelChat",
"key": "channelChat",
"description": "广播聊天消息",
"handlerFile": "src/socket/handler/channel_chat.js",
"handlerFunction": "channelChat",
"params": [],
"emits": [
"channelChat"
]
},
{
"event": "contactApply",
"key": "contactApply",
"description": "广播好友申请",
"handlerFile": "src/socket/handler/contact_apply.js",
"handlerFunction": "contactApply",
"params": [],
"emits": [
"contactApply"
]
},
{
"event": "contactApplyPass",
"key": "contactApplyPass",
"description": "通过好友申请",
"handlerFile": "src/socket/handler/contact_apply_pass.js",
"handlerFunction": "contactApplyPass",
"params": [],
"emits": [
"contactApplyPass"
]
},
{
"event": "contactApplyReject",
"key": "contactApplyReject",
"description": "拒绝好友申请",
"handlerFile": "src/socket/handler/contact_apply_reject.js",
"handlerFunction": "contactApplyReject",
"params": [],
"emits": [
"contactApplyReject"
]
},
{
"event": "groupApply",
"key": "groupApply",
"description": "广播群组申请",
"handlerFile": "src/socket/handler/group_apply.js",
"handlerFunction": "groupApply",
"params": [],
"emits": [
"groupApply"
]
},
{
"event": "groupApplyPass",
"key": "groupApplyPass",
"description": "通过群组申请",
"handlerFile": "src/socket/handler/group_apply_pass.js",
"handlerFunction": "groupApplyPass",
"params": [],
"emits": [
"groupApplyPass"
]
},
{
"event": "groupApplyReject",
"key": "groupApplyReject",
"description": "拒绝群组申请",
"handlerFile": "src/socket/handler/group_apply_reject.js",
"handlerFunction": "groupApplyReject",
"params": [],
"emits": [
"groupApplyReject"
]
},
{
"event": "channelVideoCall",
"key": "channelVideoCall",
"description": "广播视频消息",
"handlerFile": "src/socket/handler/channel_video.js",
"handlerFunction": "channelVideoCall",
"params": [],
"emits": [
"channelVideoCall"
]
},
{
"event": "channelFile",
"key": "channelFile",
"description": "文件",
"handlerFile": "src/socket/handler/channel_file.js",
"handlerFunction": "channelFile",
"params": [],
"emits": [
"channelFile"
]
}
],
"outboundEvents": [
{
"key": "created",
"event": "created",
"description": "创建房间"
},
{
"key": "joined",
"event": "joined",
"description": "加入房间"
},
{
"key": "offer",
"event": "offer",
"description": "webrtc offer"
},
{
"key": "answer",
"event": "answer",
"description": "webrtc answer"
},
{
"key": "candidate",
"event": "candidate",
"description": "webrtc candidate"
},
{
"key": "exit",
"event": "exit",
"description": "退出"
},
{
"key": "count",
"event": "count",
"description": "人数"
},
{
"key": "heartbeat",
"event": "heartbeat",
"description": "心跳"
},
{
"key": "channelChat",
"event": "channelChat",
"description": "广播聊天消息"
},
{
"key": "contactApply",
"event": "contactApply",
"description": "广播好友申请"
},
{
"key": "contactApplyPass",
"event": "contactApplyPass",
"description": "通过好友申请"
},
{
"key": "contactApplyReject",
"event": "contactApplyReject",
"description": "拒绝好友申请"
},
{
"key": "groupApply",
"event": "groupApply",
"description": "广播群组申请"
},
{
"key": "groupApplyPass",
"event": "groupApplyPass",
"description": "通过群组申请"
},
{
"key": "groupApplyReject",
"event": "groupApplyReject",
"description": "拒绝群组申请"
},
{
"key": "channelVideoCall",
"event": "channelVideoCall",
"description": "广播视频消息"
},
{
"key": "channelFile",
"event": "channelFile",
"description": "文件"
}
]
}