ws描述
请求地址:
```
ws://127.0.1:10014/ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Miwibmlja25hbWUiOiJhc2RramthIiwiYXV0aG9yaXR5X2lkIjowLCJ1dWlkIjoiIn0.2F4RX2h9wfNgGTYvLimb96CzbDJW1dFpWYg1gAlvng8
```
ip:
端口:10014
参数:token
谷歌proto
```
syntax = "proto3";
package pb;
// 上线或离线
message ClientOnlySwitch {
bool only = 1;
int64 timestamp = 2;
}
// 自动接充值
message ClientAutoCz {
bool cz = 1;
int64 timestamp = 2;
}
// 自动接提现
message ClientAutoTx {
bool tx = 1;
int64 timestamp = 2;
}
// 抢单
message ClientVieForOrderReq{
string order_id = 1;
int64 timestamp = 2;
}
// 确认到账
message ClientArrivalReq {
string order_id = 1;
int64 timestamp = 2;
}
// ping pong
message ClientPong {
int64 timestamp = 2;
}
// 客户端消息
message ClientMsg {
int64 timestamp = 1;
oneof Message {
ClientArrivalReq arrival = 2;
ClientVieForOrderReq vie = 3;
ClientOnlySwitch only = 4;
ClientAutoCz cz = 5;
ClientAutoTx tx = 6;
ClientPong pong = 7;
}
}
// server message
message ServerMsg {
oneof Message {
ServerErr err = 1; // error message
ServerVie vie = 2; // vie order
ServerSync sync = 3; // sync time zone
ServerOrder order = 4; // order
}
}
message ServerErr {
// 10000 成功的操作
// 10001 服务器错误
// 10003 内部异常
int32 code = 1; // 错误码
// 描述
string text = 2;
int64 timestamp = 3;
}
message ServerVie {
int64 user_id = 1;
int64 result = 2;
int64 timestamp = 3;
}
message ServerSync {
int64 user_id = 1;
int64 timestamp = 2;
}
message ServerOrder {
int64 order_type = 1;
string order_id = 2;
double amount = 3;
int64 pay_mode = 4;
}
```