/// <summary> /// Sends a message to all clients except the client that sent the message. /// Mostly used when a message is received /// </summary> /// <param name="sender">Object that sent the message</param> /// <param name="e">Arguments associated with a message event</param> protected virtual void _forwardMessage(object sender, MsgEventArgs e) { foreach (var _client in _clients) { if (_client != sender) { _client.SendAsync(e.Message); } } }
protected void _invokeMessageSent(MsgEventArgs e) { MessageSent?.Invoke(this, e); }
protected void _invokeMessageReceived(MsgEventArgs e) { MessageReceived?.Invoke(this, e); }