public override void send(PlainMessage message) { if (client.Connected) { writer.WriteLine(message.ToString()); } else { failed = true; throw new System.IO.IOException(); } }
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"); } }
public override void send(PlainMessage message) { writer.WriteLine(message.ToString()); }