private void SNetClient_OnRecieve(object sender, SocketEventArgs e) { switch (e.Message.Type) { case MessageType.TextMessage: LogMessage("{0}", TextMessage.FromMessageBase(e.Message).Text); break; default: break; } }
private void ListenSocket_OnRecieve(object sender, SocketEventArgs e) { switch (e.Message.Type) { case MessageType.TextMessage: LogMessage("{0}", TextMessage.FromMessageBase(e.Message).Text); break; default: break; } (sender as SNetServer).SendToAllClients(e.Message.Buffer); }