Пример #1
0
        private IProtocolEncoderOutput GetEncoderOut(IoSession session, INextFilter nextFilter, IWriteRequest writeRequest)
        {
            IProtocolEncoderOutput output = session.GetAttribute <IProtocolEncoderOutput>(ENCODER_OUT);

            if (output == null)
            {
                // Create a new instance, and stores it into the session
                output = new ProtocolEncoderOutputImpl(session, nextFilter, writeRequest);
                session.SetAttribute(ENCODER_OUT, output);
            }

            return(output);
        }
Пример #2
0
        private IProtocolEncoderOutput GetEncoderOut(IoSession session, INextFilter nextFilter, IWriteRequest writeRequest)
        {
            IProtocolEncoderOutput output = session.GetAttribute<IProtocolEncoderOutput>(ENCODER_OUT);

            if (output == null)
            {
                // Create a new instance, and stores it into the session
                output = new ProtocolEncoderOutputImpl(session, nextFilter, writeRequest);
                session.SetAttribute(ENCODER_OUT, output);
            }

            return output;
        }