NetworkRuntime
The socket runtime. One SelectorManager drives all non-blocking I/O, the way a single Boost.Asio io_context does in libtorrent. ktor-network's selector is coroutine-native, so there are no callbacks: a read simply suspends.
Properties
Link copied to clipboard
When set, all outbound TCP connectTcp dials are tunnelled through this proxy (SOCKS5/HTTP).
Functions
Link copied to clipboard
Link copied to clipboard
suspend fun NetworkRuntime.connectTcp(host: String, port: Int, connectTimeoutMs: Long = 0, bypassProxy: Boolean = false): TcpConnection
Open a TCP connection to host:port, tunnelling through NetworkRuntime.proxy if set.