Next Topic

Previous Topic

Book Contents

Connect

int Connect(unsigned int iPort=80,bool bSecure=false,string sUsername=NULL,string sPassword=NULL)

Return values

Non zero if the function is successful; otherwise 0, and a specific error code can be retrieved by calling global function GetLastError.

Parameters

  • iPort - Port number to connect to, default port 80
  • bSecure - Set to non zero if connection is to be established using HTTPS
  • sUsername - Optional username for servers requiring authentication
  • sPassword - Optional password for servers requiring authentication

Remarks

The function connects to a HTTP server with the supplied parameters. This function must be called before any other function in this class is called.