From 2b3491dc75b3a08d85af2d648721603dbae4d28d Mon Sep 17 00:00:00 2001 From: "DESKTOP-B25GA9E\\W35" <1733709035@qq.com> Date: Tue, 14 Mar 2023 17:59:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E9=80=81=E7=AB=AF?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E7=94=A8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/MsgTransmitTools/Example/Script/TCPClientExample.cs | 2 +- .../ExtendLinkModel/TCPClient/Script/TCPClientView.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/MsgTransmitTools/Example/Script/TCPClientExample.cs b/Assets/MsgTransmitTools/Example/Script/TCPClientExample.cs index f55c88e..c2db0e2 100644 --- a/Assets/MsgTransmitTools/Example/Script/TCPClientExample.cs +++ b/Assets/MsgTransmitTools/Example/Script/TCPClientExample.cs @@ -13,7 +13,7 @@ public class TCPClientExample : MonoBehaviour,ITCPClient Debug.Log("TestGetMsg:"+e.msg); Debug.Log("IpAddress:"+sender); //应答 - this.sendRequest(new StringRequest("Received!")); + this.sendRequest(new StringRequest("Received!")); //取消接收该数据 this.offReceive(); }); diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs b/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs index e80e716..aa7b756 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs +++ b/Assets/MsgTransmitTools/ExtendLinkModel/TCPClient/Script/TCPClientView.cs @@ -128,6 +128,10 @@ namespace JXSoft { { TCPMangerArchitecture.Interface.GetModel().sendRequest(request); } + public static void sendRequest(this ITCPClient self, TRequest request) where TRequest : IRequest, new() where TDataModel:DataEventModel + { + TCPMangerArchitecture.Interface.GetModel().sendRequest(request); + } } }