SuperSocket 搭建服务器+客户端+打包工具

本文基于网上的一篇文章自己做了 实践,在此只作为记录用

服务器搭建
  1. 通过Nuget 导入SuperSocket.Engine
  2. 通过Nuget 导入GoogleProtoBuffer
  3. 创建基于protobuf协议的protocol文件
  4. 创建测试
    最终样子如下

SuperSocket 搭建服务器+客户端+打包工具_第1张图片

客户端搭建

SuperSocket 搭建服务器+客户端+打包工具_第2张图片

客户端搭建 ()一键执行批处理文件
SET _PROJECT_PATH=D:\MyServer\UnityClient\
protoc --descriptor_set_out=DefeatMessage.protobin --proto_path=./ --include_imports DefeatMessage.proto
protogen DefeatMessage.protobin
move .\*.cs %_PROJECT_PATH%\Assets\Scripts\Proto\
pause

工程+工具

你可能感兴趣的:(服务器开发)