TransportFactory

fun interface TransportFactory(source)

Factory for creating transport connections.

Implement this interface to provide custom transport implementations for SSH connections. The library provides KtorTcpTransportFactory as a default TCP implementation.

Example custom implementation:

class MyTransportFactory : TransportFactory {
override suspend fun create(): Transport {
return MyCustomTransport()
}
}

Inheritors

Functions

Link copied to clipboard
abstract suspend fun create(): Transport

Create and connect a new transport instance.