wodHttpDLX ActiveX Control - Connect Method
      
 

Description

Connects to remote server.


Return Type

None  


Syntax

object.Connect [Host], [Port]



The Connect Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodHttpDLX.
Host Optional. A Variant value. Specifies name or IP address of the server.
Port Optional. A Variant value. Specifies port on the server.

Remarks

Before executing the Connect method, you must first set the Hostname property, or provide hostname information to Host argument.

The following sample will manually connect to WeOnlyDo's WEB server (code in VB):

wodHttp1.Blocking = True
wodHttp1.Hostname = "http://www.weonlydo.com"
wodHttp1.Port = 80
wodHttp1.Connect
If wodHttp1.LastError <> 0 Then
  MsgBox "Unsuccessful - Error:" & wodHttp1.LastError
End If


Please note that if a proxy is used to connect to a server and the connection fails for some reason, the possible cause is a rejected request by the proxy, or other proxy failures.

There is no need to explicitly call Connect method, since Get, Post, Put and other methods will do this for you.

NOTE: If host cannot be found (invalid hostname specified), or wodHttpDLX fails to connect to it, Disconnected event will be fired - Done will NOT be fired since actual HTTP protocol was not yet performed.