# go-tcp-server-game **Repository Path**: xkong_learn/go-tcp-server-game ## Basic Information - **Project Name**: go-tcp-server-game - **Description**: golang学习 简单tcp服务框架-一个游戏例子 根据:bilibili zinx服务视频学习手巧 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-10 - **Last Updated**: 2024-10-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # zinx-Golang轻量级TCP服务器框架(适合Go语言自学-深入浅出) https://www.bilibili.com/video/BV1wE411d7th?p=91&spm_id_from=pageDriver&vd_source=7f7c364b89e4cadc6910920c946c39e4 ![img.png](img.png) #### 什么是 Protocol Buffers? 协议缓冲区是 Google 的语言中立、平台中立、可扩展的 序列化结构化数据的机制 – 考虑 XML,但更小、更快,以及 简单。您只需定义一次数据的结构,然后就可以 使用特殊生成的源代码轻松编写和读取结构化数据 与各种数据流之间来回切换,并使用多种语言 Reference: [Protocol Buffer 基础: Go |Protocol Buffers 文档 (protobuf.dev)](https://protobuf.dev/getting-started/gotutorial/) #### 安装protoc [Release Protocol Buffers v28.2 · protocolbuffers/protobuf · GitHub](https://github.com/protocolbuffers/protobuf/releases/tag/v28.2) [protoc-28.2-win64.zip](https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-win64.zip) [golang安装protobuf 2022最新安装教程(windows)\_protoc最新版本-CSDN博客](https://blog.csdn.net/weixin_51952373/article/details/123098967) ### Go插件 go install google.golang.org/protobuf/cmd/protoc-gen-go@latest --- #### protoc编译 ``` protoc -I=./pb --go_out=./pb ./pb/addressbook.proto -I 输出目录,包含.proto文件的目录 --go_out: 输出生成go文件的目录 protoc --go_out=. *.proto ``` ## Reference - [Golang轻量级并发服务器框架zinx](https://www.yuque.com/aceld/npyr8s/geg4eh)