public void RegisterSession(ClientSession.ClientSession clientSession) { if (clientSession.Channel?.Id != null) { Sessions.Add(clientSession.Channel); } ClientSessions.TryAdd(clientSession.SessionId, clientSession); }
public void UnregisterSession(ClientSession.ClientSession clientSession) { ClientSessions.TryRemove(clientSession.SessionId, out _); if (clientSession.Channel?.Id != null) { Sessions.Remove(clientSession.Channel); } }
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; }
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; }
public void RegisterSession(NetworkClient clientSession) { Session = (ClientSession.ClientSession)clientSession; }