Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
 public virtual void Connected(ConnectionServer con)
 {
     ActiveConnections.Add(con);
     OnClientConnected?.Invoke(con);
     Logger.Info("Connection established: {connection}.", con);
 }