RequestTcpIpForwarding Method
Requests the server to forward a remote TCP/IP port.
Syntax
[VB.NET] Public Sub RequestTcpIpForwarding(ByVal Address As String, ByVal Port As Integer)
[C#] public void RequestTcpIpForwarding(string address, int port);
Remarks
The RequestTcpIpForwarding method asks the server to listen at the specified TCP/IP Address and Port for connection requests and then forward them as new SSH channels to the component.
The Address argument can specified in different ways:
- "" means that connections are to be accepted on all protocol families supported by the server.
- "0.0.0.0" means to listen on all IPv4 addresses.
- "::" means to listen on all IPv6 addresses.
- "localhost" means to listen on all protocol families supported by the SSH implementation on loopback addresses only.
- "127.0.0.1" and "::1" indicate listening on the loopback interfaces for IPv4 and IPv6, respectively.
Passing a value of 0 for the Port parameter instructs the server to assign a port. In this case, query the ForwardedPort setting to determine the port that was assigned by the server.
NOTE: This method has a corresponding asynchronous version (RequestTcpIpForwardingAsync) for use in the Xamarin environment.