def getsockopt name, array
      rc = __getsockopt__ name, array

      if Util.resultcode_ok?(rc) && (RCVMORE == name)
        # convert to boolean
        array[0] = 1 == array[0]
      end

      rc
    end
def getsockopt name, array
      rc = __getsockopt__ name, array

      if Util.resultcode_ok?(rc) && (RCVMORE == name)
        # convert to boolean
        array[0] = 1 == array[0]
      end

      rc
    end
Get the options set on this socket.

 @param name
   One of @XS::RCVMORE@, @XS::SNDHWM@, @XS::AFFINITY@, @XS::IDENTITY@,
          @XS::RATE@, @XS::RECOVERY_IVL@, @XS::SNDBUF@,
          @XS::RCVBUF@, @XS::FD@, @XS::EVENTS@, @XS::LINGER@,
          @XS::RECONNECT_IVL@, @XS::BACKLOG@, XS::RECONNECT_IVL_MAX@,
          @XS::RCVTIMEO@, @XS::SNDTIMEO@, @XS::IPV4ONLY@, @XS::TYPE@,
          @XS::RCVHWM@, @XS::MAXMSGSIZE@, @XS::MULTICAST_HOPS@,
          @XS::KEEPALIVE@
 @param array should be an empty array; a result of the proper type
   (numeric, string, boolean) will be inserted into
   the first position.

 @return 0 when the operation completed successfully
 @return -1 when this operation failed

 With a -1 return code, the user must check XS.errno to determine the
 cause.

 @example Retrieve send high water mark
   array = []
   rc = socket.getsockopt(XS::SNDHWM, array)
   sndhwm = array.first if XS::Util.resultcode_ok?(rc)