Socket.ipv4Only

Misc. socket properties.

Each of these has a one-to-one correspondence with an option passed to $(ZMQREF zmq_msg_getsockopt()) and $(ZMQREF zmq_msg_setsockopt()). For example, identity corresponds to ZMQ_IDENTITY, receiveBufferSize corresponds to ZMQ_RCVBUF, etc.

Notes:

  • sck.identity = "foobar";
    assert (sck.identity.asString() == "foobar");
    For convenience, the setter for the identity property accepts strings. To retrieve a string with the getter, use the asString function.
  • The fd property is an int on POSIX and a SOCKET on Windows.
  • The ZMQ_SUBSCRIBE and ZMQ_UNSUBSCRIBE options are treated differently from the others; see Socket.subscribe and Socket.unsubscribe
  1. bool ipv4Only [@property getter]
  2. bool ipv4Only [@property setter]
    struct Socket
    @safe @property
    void
    ipv4Only
    (
    bool value
    )
  3. this(SocketType type)
  4. this(Context context, SocketType type)

Throws

ZmqException if $(ZMQ) reports an error.

Corresponds to

$(ZMQREF zmq_msg_getsockopt()) and $(ZMQREF zmq_msg_setsockopt()).

Meta