Socket.close

Closes the $(ZMQ) socket.

Note that the socket will be automatically closed when the last reference to it goes out of scope, so it is often not necessary to call this method manually.

Throws

ZmqException if $(ZMQ) reports an error.

Corresponds to

$(ZMQREF zmq_close())

Examples

auto s = Socket(SocketType.pair);
assert (s.initialized);
s.close();
assert (!s.initialized);

Meta