private void check_protocol (String protocol_)
    {
        //  First check out whether the protcol is something we are aware of.
        if (!protocol_.equals("inproc") && !protocol_.equals("ipc") && !protocol_.equals("tcp") /*&&
              !protocol_.equals("pgm") && !protocol_.equals("epgm")*/) {
            ZError.errno (ZError.EPROTONOSUPPORT);
            throw new UnsupportedOperationException (protocol_);
        }

        //  Check whether socket type and transport protocol match.
        //  Specifically, multicast protocols can't be combined with
        //  bi-directional messaging patterns (socket types).
        if ((protocol_.equals("pgm") || protocol_.equals("epgm")) &&
              options.type != ZMQ.ZMQ_PUB && options.type != ZMQ.ZMQ_SUB &&
              options.type != ZMQ.ZMQ_XPUB && options.type != ZMQ.ZMQ_XSUB) {
            ZError.errno (ZError.EPROTONOSUPPORT);
            throw new UnsupportedOperationException (protocol_ + ",type=" + options.type);
        }

        //  Protocol is available.
    }