public void Close() { if (P2P) CommunicationTcp.Close(); else { CommunicationRabbitMqM2S.Close(); CommunicationRabbitMqS2M.Close(); } }
public void SendData(string message,bool sendSize) { if (P2P) { if(sendSize) { CommunicationTcp.SendData(message.Length.ToString()); CommunicationTcp.SendData(message); } else { CommunicationTcp.SendData(message); } } else CommunicationRabbitMqM2S.Publish(message); }