Ejemplo n.º 1
0
 public void RegisterSession(ClientSession.ClientSession clientSession)
 {
     if (clientSession.Channel?.Id != null)
     {
         Sessions.Add(clientSession.Channel);
     }
     ClientSessions.TryAdd(clientSession.SessionId, clientSession);
 }
Ejemplo n.º 2
0
        public void UnregisterSession(ClientSession.ClientSession clientSession)
        {
            ClientSessions.TryRemove(clientSession.SessionId, out _);

            if (clientSession.Channel?.Id != null)
            {
                Sessions.Remove(clientSession.Channel);
            }
        }
Ejemplo n.º 3
0
 public PipelineFactory(ISocketChannel channel, MessageToMessageDecoder <IByteBuffer> decoder,
                        MessageToMessageEncoder <string> encoder, ClientSession.ClientSession clientSession, GameServerConfiguration configuration)
 {
     _channel       = channel;
     _decoder       = decoder;
     _encoder       = encoder;
     _clientSession = clientSession;
     _configuration = configuration;
 }
Ejemplo n.º 4
0
 public PipelineFactory(ISocketChannel channel, MessageToMessageDecoder <IByteBuffer> decoder,
                        MessageToMessageEncoder <IEnumerable <IPacket> > encoder, ClientSession.ClientSession clientSession,
                        IOptions <ServerConfiguration> configuration)
 {
     _channel       = channel;
     _decoder       = decoder;
     _encoder       = encoder;
     _clientSession = clientSession;
     _configuration = configuration;
 }
Ejemplo n.º 5
0
 public void RegisterSession(NetworkClient clientSession)
 {
     Session = (ClientSession.ClientSession)clientSession;
 }