|
|
@ -125,6 +125,25 @@ namespace Rs.Framework
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] sendData = Encoding.ASCII.GetBytes(content);
|
|
|
|
byte[] sendData = Encoding.ASCII.GetBytes(content);
|
|
|
|
if(m_IsConnected)
|
|
|
|
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
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|