Reworked how Client/Server transports are implemented
let users provide CoroutineScope where to launch Server in general way for all transports: in that way, users and transports can control both life-cycle and dispatchers for server running code
add CoroutineContext to ClientTransport to specify in which context handling will happen
allow users to launch server in specific scope and attach ClientTransport to some Job
Connection and RSocket now implements CoroutineScope
hacked Limiter to work all time even if not efficient (@OlegDokuka will improve this)
Improve TcpClient and TcpServer transport
automatic handling of SelectorManager based on provided context: default dispatcher for JVM is IO, if you override it, make sure, that this dispatcher is suitable for blocking tasks, don't use Default dispatcher, for TCP
NOTE: Depends on #177
CoroutineScope
where to launchServer
in general way for all transports: in that way, users and transports can control both life-cycle and dispatchers for server running codeCoroutineContext
toClientTransport
to specify in which context handling will happenClientTransport
to some JobConnection
andRSocket
now implementsCoroutineScope
Limiter
to work all time even if not efficient (@OlegDokuka will improve this)SelectorManager
based on provided context: default dispatcher for JVM is IO, if you override it, make sure, that this dispatcher is suitable for blocking tasks, don't useDefault
dispatcher, for TCP