internal void OnAuthenticated(NetConnection con, UserHandle handle) { _awaitingActions.Enqueue(() => { var uID = con.RemoteUniqueIdentifier; Handles[uID] = handle; _connections.Add(Handles[uID], con); Authenticated?.Invoke(this, new ConnectionEventArgs(Handles[uID])); }); }
public AuthenticationStatus Authenticate(NetIncomingMessage msg, out UserHandle handle) { handle = new UserHandle() { UserID = 0, ConnectionID = msg.SenderConnection.RemoteUniqueIdentifier }; Authenticated?.Invoke(this, handle); return(AuthenticationStatus.OK); }
public AuthenticationStatus Authenticate(NetIncomingMessage msg, out UserHandle handle) { handle = default(UserHandle); return(AuthenticationStatus.OK); }
public void Send(UserHandle handle, Packets.Packet p) { p.Connection = handle.ConnectionID; Sent?.Invoke(this, p); }
public ConnectionEventArgs(UserHandle sender, string data = "") { Data = data; Sender = sender; }