-
Notifications
You must be signed in to change notification settings - Fork 134
Design
Fantix King edited this page Jun 12, 2014
·
5 revisions

As shown in the diagram, each box is a Rust Task, and user will only have access to the "interface" - the red box SocketBase, which will normally be implemented as for example REQ socket.
The arrows are Rust Channels - the zero-copy communication tool between Tasks. It is very similar to the idea of Pipe in libzmq. Because Rust cannot select over socket events but only channels, I had to split the socket-related jobs into separate Tasks, and control everything in a central InnerSocketBase task, where all incoming messages are selected and handled in one place.
Let's take socket.bind() for example.
