You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CAF 0.19 introduced a new high-level DSL for spinning up connections to servers. For example:
namespacews= caf::net::web_socket;
// ...auto conn
= ws::with(sys)
// Connect to the given URI.
.connect(server)
// If we don't succeed at first, try up to 10 times with 1s delay.
.retry_delay(1s)
.max_retry_count(9)
// After connecting, spin up a worker to manage it.
.start([&sys, hello](auto pull, auto push) {
// ...
});
This is fine when doing this from the main thread that has no other task than booting up the workers. However, it's a blocking API and thus should be avoided from cooperatively-scheduled actors.
CAF should offer an asynchronous API alongside the blocking functions, e.g., async_connect, to establish the connection in some background thread.
Currently, we would have to support the new async-connect in these protocols:
WebSocket
Length-prefix Framing
The text was updated successfully, but these errors were encountered:
CAF 0.19 introduced a new high-level DSL for spinning up connections to servers. For example:
This is fine when doing this from the main thread that has no other task than booting up the workers. However, it's a blocking API and thus should be avoided from cooperatively-scheduled actors.
CAF should offer an asynchronous API alongside the blocking functions, e.g.,
async_connect
, to establish the connection in some background thread.Currently, we would have to support the new async-connect in these protocols:
The text was updated successfully, but these errors were encountered: