private void SendMessage(Message message, IPEndPoint endpoint) { lastSent = DateTime.Now; byte[] buffer = message.Encode(); //Console.WriteLine ("Sending: {0}", message.GetType ().Name); listener.Send(buffer, endpoint); }
private void SendMessage(DhtMessage message, IPEndPoint endpoint) { lastSent = DateTime.Now; byte[] buffer = message.Encode(); listener.Send(buffer, endpoint); RaiseMessageSent(endpoint, message); }