You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create an event source for Unix domain sockets to use in an IPC Server. I tried to follow the zmq example in the book and have a working solution. But I have some design questions. Becasue there are some differences in the event sources between a ZMQ socket and a Unix socket.
With unix sockets the event sources are split into two. The listener that accepts connections. And the UnixStream that sends and receives messages.
Is it better to keep these sources separate or have a composed EventSource like this
Writ now I have two separate Event Sources one for the Listener and one for the UnixStream (there will be multiple UnixStreams because of multiple connections).
But I am wondering if I can gain some benefit by composing them like this or something similar?
The text was updated successfully, but these errors were encountered:
If having multiple sources works well for you, I don't think you'd gain much by composing everything into a single event source. So unless you think doing so would significantly improve your program structure, I'd recommend against it.
Having a single source with a dynamically changing number of underlying fds would mean it'd end up being regularly reregistered, which would be rather wasteful.
I am trying to create an event source for Unix domain sockets to use in an IPC Server. I tried to follow the zmq example in the book and have a working solution. But I have some design questions. Becasue there are some differences in the event sources between a ZMQ socket and a Unix socket.
With unix sockets the event sources are split into two. The listener that accepts connections. And the UnixStream that sends and receives messages.
Is it better to keep these sources separate or have a composed EventSource like this
Writ now I have two separate Event Sources one for the Listener and one for the UnixStream (there will be multiple UnixStreams because of multiple connections).
But I am wondering if I can gain some benefit by composing them like this or something similar?
The text was updated successfully, but these errors were encountered: