forward Stream
suspend fun forwardStream(readChannel: ByteReadChannel, writeChannel: ByteWriteChannel, remoteHost: String, remotePort: Int, originAddr: String = LOCALHOST, originPort: Int = 0): StreamForwarder?(source)
Forward a pair of streams through an SSH direct-tcpip channel.
Opens a direct-tcpip channel to remoteHost:remotePort and copies data bidirectionally between the provided Ktor channels and the SSH channel.
Return
StreamForwarder handle, or null if the channel could not be opened
Parameters
read Channel
Source of data to send through SSH
write Channel
Destination for data received from SSH
remote Host
Remote host to connect to through SSH
remote Port
Remote port to connect to through SSH
origin Addr
Originator address reported to the server
origin Port
Originator port reported to the server