MCPcopy Index your code
hub / github.com/Alex-Rachel/TGameServer

github.com/Alex-Rachel/TGameServer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
180 symbols 288 edges 20 files 6 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TGameServer

codecov Travis CI Discourse posts

TGame服务端

使用Go + TCP + UDP +My

doc: https://github.com/ALEXTANGXIAO/TGameServer

客户端地址: https://github.com/ALEXTANGXIAO/TGameUnity

Tested on darwin, linux, and windows.


├── Gameproto       // 协议
├── app             // 核心逻辑处理层
├── config          // 配置
├── logs            // 日志配置
├── manager         // 管理器
└── main.go         // 入口.go
TGame服务端 version1.0.0

参考资料

Go 语言使用 net 包实现 Socket 网络编程 https://zhuanlan.zhihu.com/p/143346084

Go语言TCP/UDP编程 https://blog.csdn.net/guidao13/article/details/84037778

Go 语言自学教程入门到精通实战进阶提升(学习路线+思维导图+视频教程+面试题+学习工具+大厂实战手册)https://www.magedu.com/84998.html
1.go env -w GO111MODULE=auto
2.go env -w GOPROXY=https://goproxy.cn/  或者
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/

go get -u github.com/golang/protobuf/protoc-gen-go

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go get github.com/golang/protobuf/proto
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest


protobuf解决办法
https://blog.csdn.net/qq_36532540/article/details/107304949

使用protobuf gogo
https://github.com/gogo/protobuf.git

Extension points exported contracts — how you extend this code

Job (Interface)
--------------------------- Job ---------------------
manager/workPool.go

Core symbols most depended-on inside this repo

checkErr
called by 6
app/tserver/server.go
CheckLogin
called by 5
app/controllers/usercontroller.go
AddFunction
called by 5
app/tserver/controller.go
checkNetErr
called by 3
app/tserver/server.go
Call
called by 3
app/tserver/controller.go
Broadcast
called by 3
app/tserver/room.go
Stop
called by 3
app/tserver/tconn.go
AddClient
called by 2
app/tserver/server.go

Shape

Method 106
Function 56
Struct 14
TypeAlias 3
Interface 1

Languages

Go100%

Modules by API surface

Gameproto/SocketGameProtocol.pb.go92 symbols
app/tserver/tconn.go12 symbols
app/tserver/server.go9 symbols
app/tserver/room.go9 symbols
manager/workPool.go8 symbols
app/tserver/protomessage.go8 symbols
app/tserver/controller.go7 symbols
app/tserver/list.go5 symbols
app/tserver/client.go5 symbols
app/controllers/usercontroller.go4 symbols
app/controllers/roomcontroller.go4 symbols
manager/utils.go3 symbols

For agents

$ claude mcp add TGameServer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact