The current model requires applications to do a lot of plumbing. Ideally, we should have a simple way to run the loop in a background thread, while providing a simple API to use the most important features from other threads in the application:
open a connection, and set parameters
open streams
queue data for sending in a stream, or on datagrams,
receive queued data on stream or datagrams,
close streams
reset streams
ask to stop sending
Adopting a simple queuing model would isolate implementations from the complexity of managing a packet loop.
The current model requires applications to do a lot of plumbing. Ideally, we should have a simple way to run the loop in a background thread, while providing a simple API to use the most important features from other threads in the application:
Adopting a simple queuing model would isolate implementations from the complexity of managing a packet loop.