connectTelnet

suspend fun connectTelnet(scope: CoroutineScope, host: String, port: Int = 23, config: TelnetConfig = TelnetConfig(), ioContext: CoroutineContext = Dispatchers.IO, connectTimeoutMillis: Long): TelnetOutcome<TelnetSession>(source)

Connects a child Telnet session using Ktor TCP. The session owns its socket and selector; cancellation during connect also closes both. No Java Socket API is used.

Throws

for a blank host, invalid port or nonpositive timeout.