Exemple #1
0
 static void TcpServerNewMessage(object sender, NewMessageEventArgs args)
 {
     Console.WriteLine(args.Message);
     _tcpServer.SendMessage(args.Client, args.Message);
 }
Exemple #2
0
 /// <summary>
 /// Raises the <see cref="E:NewMessage" /> event.
 /// </summary>
 /// <param name="eventArgs">The <see cref="NewMessageEventArgs"/> instance containing the event data.</param>
 protected virtual void OnNewMessage(NewMessageEventArgs eventArgs)
 {
     if (NewMessage != null)
         NewMessage(this, eventArgs);
 }