Esempio n. 1
0
 public override void send(PlainMessage message)
 {
     if (client.Connected)
     {
         writer.WriteLine(message.ToString());
     }
     else
     {
         failed = true;
         throw new System.IO.IOException();
     }
 }
Esempio n. 2
0
        public override void send(PlainMessage message)
        {
            var n = from node in Nodes where node.address == message.address select node;

            if (n.Count() != 0)
            {
                n.First().writer.WriteLine(message.ToString());
            }
            else
            {
                Console.WriteLine($"Node with address '{message.address}' not found");
            }
        }
Esempio n. 3
0
 public override void send(PlainMessage message)
 {
     writer.WriteLine(message.ToString());
 }