class HelloMsgSession extends SessionBase
{
    boolean newPipe;

    public HelloMsgSession(IOThread ioThread, boolean connect, SocketBase socket, Options options, Address addr)
    {
        super(ioThread, connect, socket, options, addr);
        newPipe = true;
    }

    @Override
    protected Msg pullMsg()
    {<FILL_FUNCTION_BODY>}

    @Override
    protected void reset()
    {
        super.reset();
        newPipe = true;
    }
}

        if (newPipe) {
            newPipe = false;
            return options.helloMsg;
        }

        return super.pullMsg();
    
<methods>public void <init>(zmq.io.IOThread, boolean, zmq.SocketBase, zmq.Options, zmq.io.net.Address) ,public void attachPipe(zmq.pipe.Pipe) ,public void destroy() ,public void engineError(boolean, zmq.io.StreamEngine.ErrorReason) ,public void flush() ,public java.lang.String getEndpoint() ,public zmq.SocketBase getSocket() ,public void hiccuped(zmq.pipe.Pipe) ,public final void incSeqnum() ,public void pipeTerminated(zmq.pipe.Pipe) ,public void readActivated(zmq.pipe.Pipe) ,public zmq.Msg readZapMsg() ,public void timerEvent(int) ,public java.lang.String toString() ,public void writeActivated(zmq.pipe.Pipe) ,public boolean writeZapMsg(zmq.Msg) ,public int zapConnect() <variables>private static final int LINGER_TIMER_ID,private final non-sealed boolean active,private final non-sealed zmq.io.net.Address addr,private zmq.io.IEngine engine,private boolean hasLingerTimer,private boolean incompleteIn,private final non-sealed zmq.io.IOObject ioObject,private final non-sealed zmq.io.IOThread ioThread,private boolean pending,private zmq.pipe.Pipe pipe,protected final non-sealed zmq.SocketBase socket,private final non-sealed Set<zmq.pipe.Pipe> terminatingPipes,private zmq.pipe.Pipe zapPipe