Right now, network communication is implemented as request/response style RPC calls. We take a MOZAIC-connection and attach request handler to it, which has a type of SomeEventType -> Result. When the remote party then sends a request, we just connect it to the assigned handler. Apart from requests, connection events (Connected, Disconnected, Quit) can also happen, Right now this is just bolted on to the handler system, where the produced result is ignored. This might not really be ideal. What would be a better way to solve this?
The nice part about doing it this way is that there is one from the network, containing both events sent by the remote party and produced by the connection status.
Right now, network communication is implemented as request/response style RPC calls. We take a MOZAIC-connection and attach request handler to it, which has a type of SomeEventType -> Result. When the remote party then sends a request, we just connect it to the assigned handler. Apart from requests, connection events (Connected, Disconnected, Quit) can also happen, Right now this is just bolted on to the handler system, where the produced result is ignored. This might not really be ideal. What would be a better way to solve this?
The nice part about doing it this way is that there is one from the network, containing both events sent by the remote party and produced by the connection status.
All input welcome!