There are multiple classes implementing socket behavior in JeroMQ.
Use ZContext.createSocket. This returns a ZMQ.Socket.
zmq.SocketBase contains low-level implementation details of ZeroMQ socket behavior.
It should not be used directly in code that uses the JeroMQ library.
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.
- zguide: Handling Multiple Sockets: general information about polling in ZeroMQ