Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.2 KB

sockets.md

File metadata and controls

35 lines (22 loc) · 1.2 KB

Sockets

There are multiple classes implementing socket behavior in JeroMQ.

tl;dr: How do I construct a Socket?

Use ZContext.createSocket. This returns a ZMQ.Socket.

zmq.SocketBase

zmq.SocketBase contains low-level implementation details of ZeroMQ socket behavior.

It should not be used directly in code that uses the JeroMQ library.

org.zeromq.ZMQ.Socket

ZMQ.Socket is the user-facing API for working with sockets in JeroMQ.

Sockets are constructed by calling ZContext.createSocket. This is essential because it registers the poller with the context, so that when the context is closed, the poller and selector resources are cleaned up properly.

See also