void HandleChatMsg(InsightNetworkMessage netMsg) { if (server.logNetworkMessages) { Debug.Log("[ChatServer] - Received Chat Message."); } ChatMsg message = netMsg.ReadMessage <ChatMsg>(); if (authModule != null) { //Inject the username into the message message.Origin = authModule.GetUserByConnection(netMsg.connectionId).username; foreach (UserContainer user in authModule.registeredUsers) { server.SendToClient(user.connectionId, (short)MsgId.Chat, message); } } //No Authentication Module. Simple Echo else { //Broadcast back to all other clients server.SendToAll((short)MsgId.Chat, message); } }
private void HandleStartMatchSearchMsg(InsightNetworkMessage netMsg) { if (server.logNetworkMessages) { UnityEngine.Debug.Log("[MatchMaking] - Player joining MatchMaking."); } playerQueue.Add(authModule.GetUserByConnection(netMsg.connectionId)); }
void HandleStartMatchSearchMsg(InsightNetworkMessage netMsg) { logger.Log("[MatchMaking] - Player joining MatchMaking."); playerQueue.Add(authModule.GetUserByConnection(netMsg.connectionId)); }