Creates a new $(ZMQ) socket.
If context is not specified, the default _context (as returned by $(FREF defaultContext)) is used.
ZmqException if $(ZMQ) reports an error.
$(ZMQREF zmq_socket())
With default context:
auto sck = Socket(SocketType.push); assert (sck.initialized);
With explicit context:
auto ctx = Context(); auto sck = Socket(ctx, SocketType.push); assert (sck.initialized);
See Implementation
Creates a new $(ZMQ) socket.
If context is not specified, the default _context (as returned by $(FREF defaultContext)) is used.