示例#1
0
 public Packet(IPacketDataSerializer packetDataSerializer, string header, byte[] data, int size, WebSocketMessageType messageType, bool endOfMessage)
 {
     this.packetDataSerializer = packetDataSerializer;
     this.Data         = data;
     this.Size         = size;
     this.MessageType  = messageType;
     this.EndOfMessage = endOfMessage;
     this.Header       = header;
 }
 public Connection(ILogger logger, WebSocket socket, IPacketDataSerializer packetDataSerializer)
 {
     this.SendQueue            = new ConcurrentQueue <Packet>();
     this.logger               = logger;
     this.socket               = socket;
     this.packetDataSerializer = packetDataSerializer;
     this.buffer               = new byte[4096];
     this.KillTask             = new TaskCompletionSource <object>();
 }
示例#3
0
 public ConnectionProvider(ILogger logger, IPacketDataSerializer packetDataSerializer)
 {
     this.logger = logger;
     this.packetDataSerializer = packetDataSerializer;
 }