Exemple #1
0
 public virtual void Disconnected(ConnectionServer con, EDisconnectReason eReason)
 {
     Logger.Info("Connection closed: {connection}. {reason}.", con, eReason);
     con.Disconnect(eReason);
     if (!ActiveConnections.Remove(con))
     {
         Logger.Error("Unknown connection: {connection}.", con);
     }
 }
Exemple #2
0
 public virtual void Connected(ConnectionServer con)
 {
     ActiveConnections.Add(con);
     OnClientConnected?.Invoke(con);
     Logger.Info("Connection established: {connection}.", con);
 }