protobuf是laya里搞的原生protobuf,protobuf官网地址:https://www.npmjs.com/package/protobufjs#using-proto-files
一些接口或者使用方式请自行参考。
在测试socket之前可以先自行试一下protobuf的使用,我回答了一个问题,可以参考这里:
https://ask.layabox.com/question/2687?notification_id=30281&rf=false&item_id=13447&answer_id=13447&single=TRUE#!answer_13447
服务端我用的skynet,skynet是开源的,基于skynet写的服务端代码我就不方便开源了。skynet的传送地址:
https://github.com/cloudwu/skynet
最后,我的这个laya测试客户端地址:
https://github.com/Edimier/laya_net.git
可能会有问题(暂时我也不知道会有啥问题),欢迎大家一起讨论指正。