public ChatServer(IPAddress localaddr, int port, string logfile) : base(localaddr, port, logfile) { nickTable = new BidirectionalDict<Client, string>(); OnDisconnect += Handle_OnDisconnect; OnConnect += DefaultHandle_OnConnect; }
public KeyboardManager() { _frame = 0; _bindings = new BidirectionalDict<string, KeyBinding>(); _previous = InputSnapshot.With(Keyboard.GetState()); _current = InputSnapshot.With(Keyboard.GetState()); _repeatingBindingHistory = new Dictionary<string, int>(); }
public GameServer(GameSettings settings) : base(IPAddress.Any, settings.Port, settings.LogFilename) { OnDisconnect += Handle_OnDisconnect; OnConnect += Handle_OnConnect; PlayerTable = new BidirectionalDict<string, Client>(); Game = new Game(settings); Settings = settings; }
/// <summary> /// Construct a basic server such that it is ready to be started, and possibly using the default connect /// behavior. /// </summary> public BasicServer(IPAddress localaddr, int port, string logFileName = null, bool tailLog = true) { IsRunning = false; _localaddr = localaddr; _port = port; ClientTable = new BidirectionalDict<string, Client>(); AuthTable = new DefaultDict<Client, bool>(); Log = new FileLog(logFileName, Frequency.Burst); if (tailLog) Log.AddMirror(new ConsoleLog()); Log.Info("Server initialized: <{0}>::{1}".format(localaddr, port)); }