Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
FirstGameDevOrg
FirstGameServer
Repository navigation
Code
Issues
2
(2)
Pull requests
Actions
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
FirstGameServer
/
socket.proto
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
90 lines (71 loc) · 1.7 KB
master
Breadcrumbs
FirstGameServer
/
socket.proto
Copy path
Top
File metadata and controls
Code
Blame
90 lines (71 loc) · 1.7 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
syntax = "proto3";
package pb.socket;
// 对外服数据协议包装
message ExternalMessage {
// 请求命令类型: 0 心跳,1 业务
int32 cmdCode = 1;
// 协议开关,用于一些协议级别的开关控制,比如 安全加密校验等。 : 0 不校验
int32 protocolSwitch = 2;
// 业务路由(高16为主, 低16为子)
int32 cmdMerge = 3;
// 响应码。从字段精简的角度,我们不可能每次响应都带上完整的异常信息给客户端排查问题,因此,我们会定义一些响应码,通过编号进行网络传输,方便客户端定位问题。0:成功!=0: 表示有错误
int32 responseStatus = 4;
// 验证信息
string validMsg = 5;
bytes data = 6;
}
// 用户创建房间请求
message UserCreateRoom {
// 房间名
string roomName = 1;
// 最大人数
int32 playerCount = 2;
}
// {classComment}
message UserJoin {
string username = 1;
int64 roomid = 2;
}
// 单个房间信息
message PlayroomList {
// 房间列表map
map<int32,PlayroomInfo> longPlayroomInfoMap = 1;
}
// 房间创建信息
message PlayroomInfo {
// 房间ID
int32 roomId = 1;
// 房间名
string roomName = 2;
// 创建者ID
int32 primaryuserID = 3;
// 房间最大人数
int32 playerMaxCount = 4;
// 房间当前人数
int32 playerCount = 5;
}
// 用户信息响应
message UserInfo {
// id
int64 id = 1;
// 用户昵称
string name = 2;
// jwt
string jwt = 3;
}
// 用户登录请求
message UserLogin {
// 邮箱
string email = 1;
// 密码
string password = 2;
}
// 测试spring消息连通
message HelloSpringMsg {
string name = 1;
}
// {classComment}
message UserSearch {
string username = 1;
string roomname = 2;
}
You can’t perform that action at this time.