// Creates and starts a new server public Server(int port, Guid gameId, Version gameVersion) { _tcp = new TcpListener(IPAddress.Any, port); _handler = new Handler(gameId, gameVersion); _connectionChecker = new Thread(CheckConnections); _connectionChecker.Start(); Start(); }
private TcpListener tcp; // Underlying windows socket #endregion Fields #region Constructors // Creates and starts a new server public Server(int port, Guid gameId, Version gameVersion) { tcp = new TcpListener(System.Net.IPAddress.Any, port); this.handler = new Handler(gameId, gameVersion); ConnectionChecker = new Thread(CheckConnections); ConnectionChecker.Start(); Start(); }
// Creates and starts a new server public Server(IGameStateEngine stateEngine) { GameStateEngine.Set(stateEngine); _tcp = new TcpListener(IPAddress.Any, stateEngine.Game.HostUri.Port); _handler = new Handler(stateEngine.Game.GameId, stateEngine.Game.GameVersion); _connectionChecker = new Thread(CheckConnections); _connectionChecker.Start(); Start(); }
// Creates and starts a new server public Server(IGameStateEngine stateEngine) { GameStateEngine.Set(stateEngine); Log.InfoFormat("Creating server {0}",stateEngine.Game.HostUri); _tcp = new TcpListener(IPAddress.Any, stateEngine.Game.HostUri.Port); _handler = new Handler(stateEngine.Game.GameId, stateEngine.Game.GameVersion,stateEngine.Game.Password); _connectionChecker = new Thread(CheckConnections); _connectionChecker.Start(); Start(); }
public BinaryParser(Handler handler) { _handler = handler; }
public BinarySenderStub(ServerSocket to, Handler handler) : base(handler) { this.to = to; }
internal Broadcaster(Handler handler) { bin = new BinFormatter(this, handler); }
internal Broadcaster(Dictionary<TcpClient, Handler.PlayerInfo> to, Handler handler) { this.to = to; this.handler = handler; xml = new XmlFormatter(this, handler); }
public BinarySenderStub(TcpClient to, Handler handler) : base(handler) { this.to = to; }
public XmlSenderStub(TcpClient to, Handler handler) : base(handler) { _to = to; }
protected BaseXmlStub(Handler handler) { XmlSettings.OmitXmlDeclaration = true; _handler = handler; }
protected BaseBinaryStub(Handler handler) { _handler = handler; }
public BaseBinaryStub(Handler handler) { this.handler = handler; }
public BinaryParser(Handler handler) { this.handler = handler; }
public XmlParser(Handler handler) { this.handler = handler; }
internal XmlFormatter(Broadcaster bcast, Handler handler) : base(handler) { _bcast = bcast; }
public BaseXmlStub(Handler handler) { xmlSettings.OmitXmlDeclaration = true; this.handler = handler; }
internal BinFormatter(Broadcaster bcast, Handler handler) : base(handler) { this.bcast = bcast; }
public XmlParser(Handler handler) { _handler = handler; }