# smart **Repository Path**: ywengineer/smart ## Basic Information - **Project Name**: smart - **Description**: Game server dev framework base on cloudwego's epoll - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-25 - **Last Updated**: 2025-09-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: Go语言, gameserver ## README # Smart Game Server Engine > base on github.com/bytedance/netpoll ## Protocol 协议编码 ```text 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f +--------------------------------------------------------------+ | LENGTH | +--------------------------------------------------------------+ | HEADER MAGIC | COMPRESS | FLAGS | +--------------------------------------------------------------+ | | | BODY | | | +--------------------------------------------------------------+ ``` 其中: - LENGTH 字段 32bits,BODY 部分的字节大小 - HEADER MAGIC 字段 16bits,值为:0x0000,用于标识 协议 - SmartProtocol = 0x0000 - COMPRESS 字段 8bits,BODY 压缩算法,暂未实现,默认值为 0x0000 - ZLIB = 0x01,表示用 zlib 压缩数据; - SNAPPY = 0x02,表示用 snappy 压缩数据; - FLAGS 字段 8bits,为预留字段,暂未使用,默认值为 0x0000 - BODY 消息内容, message.ProtocolMessage 的字节数组