Back to product page

ProxyHostname function


Specifies the hostname of the proxy to use.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetProxyHostname(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetProxyHostname(void *Sftp, char *newVal);
The ProxyHostname(void *Sftp,char *Buffer,int *Bufsize) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *BufferBuffer that will hold the returned string.
int *BufsizeSize of the buffer.

Remarks

When the wodSFTP client is unable to establish a direct connection (when it is not connected directly to the internet, for example), the proxy option can be used. There are several types of proxies supported by the wodSFTP control. When any proxy is used, this function specifies the hostname for the remote proxy. Be careful though, this function is not the same as the Hostname function.

When a connection to the proxy specified in ProxyHostName is established, wodSFTP will issue a request to the proxy to open a remote connection to the hostname specified by the Hostname function.

The Bufsize variable should contain the maximum allowed size that can be stored in the Buffer variable. If you set Bufsize = 0, then the function will return with error ERROR_INSUFFICIENT_BUFFER and Bufsize will contain the requried buffer size.

Platforms

Windows