https://kotlinlang.org logo
#ktor
Title
# ktor
l

LastExceed

04/21/2022, 11:39 AM
how do i configure a timeout for a tcp socket?
a

Aleksei Tirman [JB]

04/21/2022, 12:21 PM
Copy code
val selectorManager = ActorSelectorManager(<http://Dispatchers.IO|Dispatchers.IO>)
val socket = aSocket(selectorManager).tcp().connect(InetSocketAddress("127.0.0.1", 1234)) {
    socketTimeout = 1000
}
7 Views