Struct protosocket_server::ConnectionServer
source · pub struct ConnectionServer<Connector: ServerConnector> { /* private fields */ }
Expand description
A ConnectionServer is an IO driver. It directly uses mio to poll the OS’s io primitives, manages read and write buffers, and vends messages to & from connections. Connections interact with the ConnectionServer through mpsc channels.
Protosockets are monomorphic messages - you can only have 1 kind of message per service. The expected way to work with this is to use prost and protocol buffers to encode messages.
Protosocket messages are not opinionated about request & reply. If you are, you will need
to implement such a thing. This allows you freely choose whether you want to send
fire-&-forget messages sometimes; however it requires you to write your protocol’s rules.
You get an inbound stream of