class ReqSession extends SessionBase
    {
        enum State
        {
            BOTTOM,
            REQUEST_ID,
            BODY
        }

        private State state;

        public ReqSession(IOThread ioThread, boolean connect, SocketBase socket, final Options options,
                final Address addr)
        {
            super(ioThread, connect, socket, options, addr);

            state = State.BOTTOM;
        }

        @Override
        public boolean pushMsg(Msg msg)
        {<FILL_FUNCTION_BODY>}

        @Override
        public void reset()
        {
            super.reset();
            state = State.BOTTOM;
        }
    }

            //  Ignore commands, they are processed by the engine and should not
            //  affect the state machine.
            if (msg.isCommand()) {
                return true;
            }

            switch (state) {
            case BOTTOM:
                if (msg.hasMore()) {
                    //  In case option ZMQ_CORRELATE is on, allow request_id to be
                    //  transfered as first frame (would be too cumbersome to check
                    //  whether the option is actually on or not).
                    if (msg.size() == 4) {
                        state = State.REQUEST_ID;
                        return super.pushMsg(msg);
                    }
                    else if (msg.size() == 0) {
                        state = State.BODY;
                        return super.pushMsg(msg);
                    }
                }
                break;
             case REQUEST_ID:
                if (msg.hasMore() && msg.size() == 0) {
                    state = State.BODY;
                    return super.pushMsg(msg);
                }
                break;
            case BODY:
                if (msg.hasMore()) {
                    return super.pushMsg(msg);
                }
                if (msg.flags() == 0) {
                    state = State.BOTTOM;
                    return super.pushMsg(msg);
                }
                break;
            default:
                break;
            }
            errno.set(ZError.EFAULT);
            return false;
        
<methods>public void <init>(zmq.Ctx, int, int) <variables>private final non-sealed zmq.socket.FQ fq,private final non-sealed zmq.socket.LB lb,private boolean probeRouter