예제 #1
0
 public MasterServer(
     MasterServerConfiguration configuration,
     MasterServerMessageSource messageSource,
     MasterServerMessageDispatcher messageDispatcher,
     IMasterServerSessionService sessionService)
     : base(IPEndPoint.Parse(configuration.EndPoint), messageSource, messageDispatcher)
 {
     _sessionService = sessionService;
     _logger         = Log.ForContext <MasterServer>();
 }
예제 #2
0
 public UserService(
     MasterServerMessageDispatcher messageDispatcher,
     IRelayServerService relayServerService,
     IServerRepository serverRepository,
     IMasterServerSessionService sessionService,
     IServerCodeProvider serverCodeProvider)
 {
     _messageDispatcher  = messageDispatcher;
     _relayServerService = relayServerService;
     _serverRepository   = serverRepository;
     _sessionService     = sessionService;
     _serverCodeProvider = serverCodeProvider;
     _logger             = Log.ForContext <UserService>();
 }
예제 #3
0
 public HandshakeService(
     MasterServerMessageDispatcher messageDispatcher,
     ICookieProvider cookieProvider,
     IRandomProvider randomProvider,
     X509Certificate2 certificate,
     ICertificateSigningService certificateSigningService,
     IDiffieHellmanService diffieHellmanService)
 {
     _messageDispatcher         = messageDispatcher;
     _cookieProvider            = cookieProvider;
     _randomProvider            = randomProvider;
     _certificate               = certificate;
     _certificateSigningService = certificateSigningService;
     _diffieHellmanService      = diffieHellmanService;
     _logger = Log.ForContext <HandshakeService>();
 }
예제 #4
0
 public HandshakeMessageHandler(
     MasterServerMessageSource messageSource,
     MasterServerMessageDispatcher messageDispatcher,
     IServiceProvider serviceProvider)
     : base(messageSource, messageDispatcher, serviceProvider)
 {
     Register <ClientHelloRequest, HelloVerifyRequest>(
         (service, session, request) => service.ClientHello(
             (MasterServerSession)session, request
             )
         );
     Register <ClientHelloWithCookieRequest, ServerHelloRequest>(
         (service, session, request) => service.ClientHelloWithCookie(
             (MasterServerSession)session, request
             )
         );
     Register <ClientKeyExchangeRequest, ChangeCipherSpecRequest>(
         (service, session, request) => service.ClientKeyExchange(
             (MasterServerSession)session, request
             )
         );
 }