From 50e952ddadbe8484f1ad4f9a80f0dc5a55094405 Mon Sep 17 00:00:00 2001 From: lhiven Date: Sun, 24 Sep 2023 10:23:52 +0900 Subject: [PATCH] =?UTF-8?q?TCP=E5=8F=91=E9=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E7=BC=96=E7=A0=81=E5=92=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=8F=91=E9=80=81=E5=AD=97=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.Framework/TcpClientHelper.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Rs.Framework/TcpClientHelper.cs b/Rs.Framework/TcpClientHelper.cs index 4f91046..a36a0ea 100644 --- a/Rs.Framework/TcpClientHelper.cs +++ b/Rs.Framework/TcpClientHelper.cs @@ -125,6 +125,25 @@ namespace Rs.Framework { byte[] sendData = Encoding.ASCII.GetBytes(content); if(m_IsConnected) + { + Send(sendData); + } + return -1; + } + + public int Send(string content,Encoding encode) + { + byte[] sendData = encode.GetBytes(content); + if (m_IsConnected) + { + Send(sendData); + } + return -1; + } + + public int Send(byte[] sendData) + { + if (m_IsConnected) { try {