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); }
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; }