public override void Init() { server = new SZHSocket(); //执行初始化服务器方法,传入委托函数 server.InitServer(/*ShowMsg*/); server.OnServerReceiveData += OnReceive; //ReceiveInitData data = new ReceiveInitData(); //Debug.Log(JsonUtility.ToJson(data)); ReceiveStepData data = new ReceiveStepData(); //Debug.Log(JsonUtility.ToJson(data)); }
public override void Init() { szhSocket = new SZHSocket(); szhSocket.InitClient("127.0.0.1", 6065, null); szhSocket.OnClientReceiveData += OnClientReceiveData; }