示例#1
0
        public void SendMessage(DataMessage message)
        {
            TCPPacketConnection consumerConnection;

            m_connector.Connect(m_consumerEndpoint, out consumerConnection);
            consumerConnection.Send(DataMessageSerializer.ToNetworkData(message));
        }
 internal void OnProducerConnected(object sender, TCPPacketConnection connection)
 {
     connection.Receive(out byte[] data, out EndPoint endpoint);
     MessageReceived.Invoke(this, DataMessageSerializer.ToMessage(data));
     connection.Disconnect();
 }