https://kotlinlang.org logo
Title
v

Venkat

04/29/2023, 12:41 PM
What's the proper way of Exception handling in the ktor Network socket? I'm looking for the possible exception on each API in "TcpSocketBuilder" or "UDPSocketBuilder". for example, the "connect" function in the TCP socket throws "ConnectException" when trying to connect an invalid address, but the api documentation never discusses this possible exception. connect( remoteAddress: SocketAddress, configure: SocketOptions.TCPClientSocketOptions.() -> Unit = {} ) Api document: https://api.ktor.io/ktor-network/io.ktor.network.sockets/connect.html I see that Ktor sockets are using java.nio under the hood, so should I look for the java.nio api doc for exceptions?
Any update for this
v

Venkat

05/10/2023, 9:35 AM
@Aleksei Tirman [JB] Thanks