IP*Works! SSH V9 - Online Help
IP*Works! SSH V9
Questions / Feedback?

OpenTcpIpChannel Method

Opens a special TCP/IP tunneling SSHChannel .

Syntax

sshclient.openTcpIpChannel(destHost, destPort, srcHost, srcPort, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

OpenTcpIpChannel opens a special SSHChannel of type "direct-tcpip". Unlike channels opened by OpenChannel, "direct-tcpip" channels are secured data tunnels that forward data through the SSHHost to another destination.

DestHost and DestPort represent, respectively, the host name or IP address and the port for which the data of this channel is bound. When OpenTcpIpChannel is called, the SSHHost will attempt to connect to the machine identified by these parameters.

Likewise, SrcHost and SrcPort identify the originator of the data. These may be different from LocalHost and LocalPort if the current instance of the class is being used to forward data from another TCP/IP client.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0