/// <summary>Initializes a new instance of the <see cref="GameServerListRequestHandler"/> class.</summary>
 public GameServerListRequestHandler(IGameServerController gameServerController)
 {
     this.gameServerController = gameServerController;
     this.gameServerController.GameServerRegistered   += (_, ev) => this.OnGameServerChange();
     this.gameServerController.GameServerDeregistered += (_, ev) => this.OnGameServerChange();
     this.gameServerController.GameServerUpdated      += (_, ev) => this.OnGameServerChange();
 }
示例#2
0
 /// <summary>Initializes a new instance of the <see cref="ClientProtocolHandler" /> class.</summary>
 public ClientProtocolHandler(
     IGameServerController gameServerController,
     IClientController clientsController)
 {
     clientsController.ClientSessionStarted += this.OnClientSessionStarted;
     this.RegisterPacketHandlers(gameServerController);
 }
示例#3
0
 /// <summary>Initializes a new instance of the <see cref="ConnectServer"/> class.</summary>
 internal ConnectServer(
     Configuration config,
     IGameServerController gameServerController,
     IClientController clientController)
 {
     this.Config = config;
     this.gameServerController = gameServerController;
     this.clientController     = clientController;
 }
 /// <summary>Initializes a new instance of the <see cref="GameServerInfoRequestHandler"/> class.</summary>
 public GameServerInfoRequestHandler(IGameServerController gameServerController) =>
 this.gameServerController = gameServerController;
示例#5
0
 private void RegisterPacketHandlers(IGameServerController gameServerController)
 {
     this.RegisterHandler <GameServerInfoRequest>(new GameServerInfoRequestHandler(gameServerController));
     this.RegisterHandler <GameServerListRequest>(new GameServerListRequestHandler(gameServerController));
     this.RegisterHandler <ClientUpdateRequest>(new ClientUpdateRequestHandler());
 }