OpenChannel Method

Opens a new SSHChannel .

Syntax

ANSI (Cross Platform)
char* OpenChannel(const char* lpszChannelType);

Unicode (Windows)
LPWSTR OpenChannel(LPCWSTR lpszChannelType);
- (NSString*)openChannel:(NSString*)channelType;
#define MID_SSHCLIENT_OPENCHANNEL 10

IPWORKSSSH_EXTERNAL int IPWORKSSSH_CALL IPWorksSSH_SSHClient_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

The SSH 2.0 specification allows for multiple channels to be opened over a single TCP/IP connection. The Channels property represents the channels that are currently open. A new SSHChannel can be opened with OpenChannel.

ChannelType represents the type of SSH channel to be opened. The most common type of channel is "session". To open a channel of type "direct-tcpip", use OpenTcpIpChannel.

If the call to OpenChannel succeeds, an SSHChannel will be created and added to the Channels collection.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 C++ Edition - Version 20.0 [Build 8501]