Beispiel #1
0
            protected override bool DecodeBytes(byte[] buffer, ref int offset, ref int size, ref bool isAtEof)
            {
                while (size > 0)
                {
                    int num = this.connectionPoolHelper.Decoder.Decode(buffer, offset, size);
                    if (num > 0)
                    {
                        offset += num;
                        size   -= num;
                    }
                    ClientFramingDecoderState currentState = this.connectionPoolHelper.Decoder.CurrentState;
                    if (currentState != ClientFramingDecoderState.EnvelopeStart)
                    {
                        if (currentState == ClientFramingDecoderState.End)
                        {
                            goto Label_0047;
                        }
                        continue;
                    }
                    return(true);

Label_0047:
                    isAtEof = true;
                    return(false);
                }
                return(false);
            }
Beispiel #2
0
 protected ClientFramingDecoder(long streamPosition)
     : base(streamPosition)
 {
     _currentState = ClientFramingDecoderState.ReadingUpgradeRecord;
 }
 protected ClientFramingDecoder(long streamPosition) : base(streamPosition)
 {
     this.currentState = ClientFramingDecoderState.ReadingUpgradeRecord;
 }