The ConnectToRemoteServer method is overwritten and implements the processing of the HTTP CONNECT request.
The request send to the proxy is as follows:
CONNECT <iq_sHostname>:<i_uiServerPort> HTTP/1.1
Proxy-Authorization: <Value for Proxy-Authorization>
The return value of type BOOL indicates TRUE if the connection to the remote server was initiated successfully. Otherwise, refer to the values of Result and ResultMsg to get detailed information about the detected error.
Input/Output |
Data type |
Description |
---|---|---|
iq_fbTcpClient |
TCPUDP.FB_TcpClient2 |
Specifies the instance of the FB_TcpClient2 for which the connection is established. |
iq_sHostname |
STRING[255] |
Specifies the fully qualified host name by which the remote server can be reached. For example: cnm-ih-na.azure-devices.net |
Input |
Data type |
Description |
---|---|---|
i_uiServerPort |
UINT |
Specifies the TCP port of the remote server to which the connection is established. |
i_xUpgradeToTls |
BOOL |
Specifies whether the socket is upgraded to TLS after the connection is established. This option is supported only for connections which are established on sockets of type StartTls. |
Output |
Data type |
Description |
---|---|---|
q_xBusy |
BOOL |
Indicates TRUE when the establishing of the connection is in progress and a further call of the method is required. |
q_xDone |
BOOL |
Indicates TRUE when the connection has been established successfully. |
q_xError |
BOOL |
Indicates TRUE when an error has been detected. Additional information about the error is provided via the properties etResult and ResultMsg. |