public PackStreamMessageFormatV1(ITcpSocketClient tcpSocketClient, ILogger logger, bool supportBytes = true)
        {
            var output = new ChunkedOutputStream(tcpSocketClient, logger);
            var input  = new ChunkedInputStream(tcpSocketClient, logger);

            if (supportBytes)
            {
                Writer = new WriterV1(output);
                Reader = new ReaderV1(input);
            }
            else
            {
                Writer = new WriterBytesIncompatibleV1(output);
                Reader = new ReaderBytesIncompatibleV1(input);
            }
        }
Example #2
0
 public PackStreamMessageFormatV1(ITcpSocketClient tcpSocketClient, ILogger logger)
 {
     Writer = new WriterV1(new ChunkedOutputStream(tcpSocketClient, logger));
     Reader = new ReaderV1(new ChunkedInputStream(tcpSocketClient, logger));
 }
 public PackStreamMessageFormatV1(ITcpSocketClient tcpSocketClient, BitConverterBase bitConverter, ILogger logger)
 {
     _bitConverter = bitConverter;
     Writer        = new WriterV1(new ChunkedOutputStream(tcpSocketClient, bitConverter, logger));
     Reader        = new ReaderV1(new ChunkedInputStream(tcpSocketClient, bitConverter, logger));
 }