diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs b/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs index bc8c371..31a3077 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs +++ b/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs @@ -53,7 +53,7 @@ namespace JXSoft { { Debug.Log("TCPӳɹ"); this.GetModel().onReceive(); - this.GetModel().sendRequestCommand(new LinkTCPRequest(deviceId)); + this.GetModel().sendRequest(new LinkTCPRequest(deviceId)); onTCPLinkSuccess.Invoke(); } if (e.linkState == (int)TCPLinkState.LinkFaild) diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/UDPClient/UDPClientView.cs b/Assets/MsgTransmitTools/ExtendLinkModel/UDPClient/UDPClientView.cs index 2d61e79..128ac97 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/UDPClient/UDPClientView.cs +++ b/Assets/MsgTransmitTools/ExtendLinkModel/UDPClient/UDPClientView.cs @@ -48,7 +48,7 @@ namespace JXSoft { { Debug.Log("UDP链接成功"); this.GetModel().onReceive(); - this.GetModel().sendRequestCommand(new LinkUDPRequest(deviceId)); + this.GetModel().sendRequest(new LinkUDPRequest(deviceId)); onUDPLinkSuccess.Invoke(); } if (e.state == UDPLinkState.LinkFaild) diff --git a/Assets/MsgTransmitTools/src/DataEventModel.cs b/Assets/MsgTransmitTools/src/DataEventModel.cs index 5c022b7..bc2f9bf 100644 --- a/Assets/MsgTransmitTools/src/DataEventModel.cs +++ b/Assets/MsgTransmitTools/src/DataEventModel.cs @@ -19,7 +19,7 @@ namespace JXSoft { public Color printColor = Color.white; #region ReceiveFunctions - public void sendResponseCommand(string json) where T : IResponse, new() + public void sendResponse(string json) where T : IResponse, new() { //如果找不到对应命令,则添加命令 if (mCommandContainer.Get>() == null) @@ -36,7 +36,7 @@ namespace JXSoft { /// 数据格式类型 public void onReceive() where T : IResponse, new() { - onDataRecived.AddListener(sendResponseCommand); + onDataRecived.AddListener(sendResponse); } /// /// 关闭接收指定数据 @@ -44,7 +44,7 @@ namespace JXSoft { /// 数据格式类型 public void offReceive() where T : IResponse, new() { - onDataRecived.RemoveListener(sendResponseCommand); + onDataRecived.RemoveListener(sendResponse); } #endregion @@ -54,7 +54,7 @@ namespace JXSoft { /// /// 数据类型 /// 请求数据 - public void sendRequestCommand(T request) where T : IRequest + public void sendRequest(T request) where T : IRequest { if (mCommandContainer.Get>() == null) { @@ -101,8 +101,6 @@ namespace JXSoft { #endregion } - - #region Command /// /// 处理响应数据,添加对应的Command进行处理,需要提前生成命令池 @@ -230,7 +228,11 @@ namespace JXSoft { } #endregion - + #region + public static class CanRegistMessageExtention { + + } + #endregion #region event public struct ResponseMsgEvent