@Override
    public boolean xsetsockopt (int option_, Object optval_)
    {
        if (option_ != ZMQ.ZMQ_SUBSCRIBE && option_ != ZMQ.ZMQ_UNSUBSCRIBE) {
            ZError.errno(ZError.EINVAL);
            return false;
        }

        byte[] val;
        
        if (optval_ instanceof String)
            val = ((String)optval_).getBytes();
        else if (optval_ instanceof byte[])
            val = (byte[]) optval_;
        else
            throw new IllegalArgumentException();
            
        //  Create the subscription message.
        Msg msg = new Msg(val.length + 1);
        if (option_ == ZMQ.ZMQ_SUBSCRIBE)
            msg.put((byte)1);
        else if (option_ == ZMQ.ZMQ_UNSUBSCRIBE)
            msg.put((byte)0);
        msg.put (val,1);

        //  Pass it further on in the stack.
        boolean rc = super.xsend (msg, 0);
        return rc;
    }