:ProxyConnect()
Class
Syntax
:ProxyConnect(nProxyType, cProxyHost, nProxyPort, cProxyUID, cProxyPWD, Host,Port,Timeout,nParams,cnVersion) -> hSession
Parameters
|
|
nProxyType |
Numeric indicating Proxy Type. See table below |
|
|
cProxyHost |
Proxy server host name |
|
|
nProxyPort |
Numeric indicating the Port on the Proxy Server to connect through |
|
|
cProxyUID |
User ID for accessing Proxy |
|
|
cProxyPWD |
Password for accessing Proxy |
|
|
cHost |
String, May be a fully-qualified domain name or an IP address. |
|
|
nPort |
Optional: Numeric, Port that the remote Server is listening on for connections |
|
|
nTimeout |
Optional: Numeric. Number of Seconds to wait before resulting in a Timeout Error. A Value of zero indicates that the process should wait indefinitely for the Server to respond. |
|
|
nParams |
Optional: Numeric, |
|
|
cnVersion |
Optional: Character or Numeric, |
Return
If the function succeeds, the return value is a numeric client session value which is stored in :Session.
If the function fails the return value is HTTP_ERROR. To get further error information see :nErr and :cErr
Description
The ProxyConnect() Method is used to establish a synchronous connection with a proxy server.
The username and password information is only used when connecting to a server which supports version 1.1 or later of the protocol.
nProxyType
|
|
Constant |
Description |
|
|
HTTP_PROXY_NONE |
The client is not connecting through a proxy server. When this value is specified the proxy parameters are ignored and the client is connected directly to the remote host. |
|
|
HTTP_PROXY_CERN |
The client is connecting to a CERN proxy server, and all resource requests will be specified using a complete URL. |
|
|
HTTP_PROXY_TUNNEL |
The client is connecting through a non-SSL CERN proxy server to a secure (HTTPS) server. (HTTP_OPTION_SECURE should also be set via nParams.) |
nParams
|
|
A bitmask which specifies one or more options. This parameter is constructed by using the adding together any of the following values: | |
|
|
HTTP_OPTION_NOCACHE |
This instructs the server to not return a cached copy of the resource. When connected to an HTTP 1.0 or earlier server, this directive may be ignored. |
|
|
HTTP_OPTION_KEEPALIVE |
This instructs the server to maintain a persistent connection between requests. This can improve performance because it eliminates the need to establish a seperate connection for each resource that is requested. If the server does not support the keep-alive option, the client will automatically reconnect when each resource is requested. Although it will not provide any performance benefits, this allows the option to be used with all servers. |
|
|
HTTP_OPTION_SECURE |
This option specifies that the client should attempt to establish a secure connection with the server. Note that the the server must support secure connections using either the SSL, PCT or TLS protocols. This option is only available in the Secure Editions of aSocks. |
See Also