1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- syntax = "proto3";
- package pb;
- option go_package = "/pb";
- // 状态命令枚举
- enum ECommand {
- SEND_MSG = 0; // 消息信息
- MSG_HEART_BEAT = 3; // 心跳
- // status
- ON_PLAYER_DISCONNECT = 1004; // 玩家断开连接 cmd_str:玩家id cmd_val:登出原因ErrorReason
- ON_PLAYER_CONNECT = 1005; // 玩家连接 cmd_str:玩家id
- ON_PLAYER_WAIT_QUEUE_INFO = 1006; // 玩家等待队列信息 消息体:CommandMsg.buff.array_id_info
- ON_PLAYER_RECEIVE_REPLY = 1007; // 玩家被应答 cmd_str:客服id
- ON_PLAYER_WAIT_QUEUE_LEN = 1008; // 玩家等待队列长度 cmd_val: 队列人数
- ON_SERVICE_DISCONNECT = 3002; // 客服断开连接 cmd_str:客服id
- ON_SERVICE_CONNECT = 3003; // 客服连接 cmd_str:客服id
- ON_SERVICE_HANG_UP_LIST = 3004; // 客服-玩家挂断列表 消息体:CommandMsg.buff.array_id_info
- // 请求操作
- CALL_PLAYER_MSG = 2001; // 玩家->服务端 发送消息
- CALL_SERVICE_MSG = 2002; // 客服->服务端 发送消息
- CALL_PLAYER_LOGOUT = 2003; // 玩家登出
- CALL_SERVICE_LOGOUT = 2004; // 客服登出
- CALL_SERVICE_REPLY = 2005; // 客服应答 cmd_str:待应答的玩家id
- CALL_PLAYER_CHAT_LOG= 2006; // 获取玩家聊天记录 cmd_str:玩家id 返回:CommandMsg.buff.array_chat_log
- // gm debug
- MSG_TEST = 100001;
- }
- // 错误枚举
- enum ErrorReason {
- ERROR_DUMMY = 0;
- PLAYER_HEART_BEAT_FAILED = 1000; // 玩家心跳失败
- PLAYER_REPEAT_LOGIN = 1001; // 玩家重复登录
- PLAYER_WAIT_QUEUE_OVERTIME = 1002; // 玩家等待队列超时
- PLAYER_TALK_INTERVAL_LIMIT = 1003; // 玩家发言时间超时
- PLAYER_CALL_LOGOUT = 1004; // 玩家主动登出
- SERVICE_REPEAT_LOGIN = 2001; // 客服重复登录
- SERVICE_CALL_LOGOUT = 2002; // 客服主动登出
- SERVICE_HEART_BEAT_FAILED = 2003; // 客服心跳超时
- }
- // 内网调试debug命令
- enum EDebugCmd {
- /*
- 修改队列等待时间(s):
- cmd_str: WaitConnServiceLimit
- cmd_val: 30
- 修改长时间聊天未发言时限(s):
- cmd_str:LastTalkIntervalLimit
- cmd_val:60
- *消息example:
- msg.cmd_type: ECommand.MSG_TEST
- msg.cmd_val: EDebugCmd.MODIFY_CONFIG
- msg.cmd_str: "{\"WaitConnServiceLimit\": 3600}"
- */
- MODIFY_CONFIG = 0; // 修改配置
- SERVICE_REPLY = 1; // 客服连接
- GET_CHAT_LOG = 2; // 获取聊天log cmd_str:客服id
- }
- // error
- enum EErrorCode {
- ERR_DUMMY = 0;
- ERR_HANDLER_CALL_ERR = 1; // 请求调用失败
- ERR_REQUEST_LIMIT = 101; // 请求过于频繁
- ERR_PLAYER_CONN_ERR = 102; // 玩家连接失败
- ERR_PARAM_ERROR = 103; // 参数错误
- ERR_SERVICE_CONN_ERR = 104; // 客服连接失败
- }
|