public void SendMessage(DataMessage message) { TCPPacketConnection consumerConnection; m_connector.Connect(m_consumerEndpoint, out consumerConnection); consumerConnection.Send(DataMessageSerializer.ToNetworkData(message)); }
static bool Connect(out TCPPacketConnection connection) { SecureConnector connector = new SecureConnector(); connector.Logger = logger; connector.Crypto = CryptoType.EC25519; if (!connector.Connect(destination, out connection)) { return(false); } connection.SendTimeout = Constants.DefaultTimeout; return(true); }