public ClientSession(SessionScope sessionScope, IPacketRouter packetRouter, IBufferPool <byte> bufferPool, ObjectPool <UncompressedPacket> uncompressedPacketObjectPool)
 {
     SessionScope = sessionScope;
     _tcpClient   = new TcpClient();
     _bufferPool  = bufferPool;
     _uncompressedPacketObjectPool = uncompressedPacketObjectPool;
     _packetRouter              = packetRouter;
     _outcomingPacketObserver   = new OutcomingPacketObserver(this);
     _outcomingPacketDispatcher = new ActionBlock <UncompressedPacket>(SendOutcomingPacket);
 }
Exemple #2
0
 public PacketRouter(SessionScope sessionScope, IEventAggregator eventAggregator)
 {
     _sessionScope    = sessionScope;
     _eventAggregator = eventAggregator;
 }