|
|
Establish a connection with a remote server.
Syntax
object.Connect( [RemoteHost],
[RemotePort], [Timeout], [Options] )
Remarks
This method establishes a network connection with a remote
server. All arguments are optional. If a given argument is missing,
then a corresponding property or properties must be set before
attempting the connection, as follows:
- RemoteHost
- A string which specifies the host name or IP address of the
remote host. If this argument is not specified, it defaults to the
value of the HostAddress property if it is defined.
Otherwise, it defaults to the value of the HostName
property.
- RemotePort
- A number which specifies the port to connect to on the remote
host. If this argument is not specified, it defaults to the value
of the RemotePort property. A value of zero indicates that
the default port number for this service should be used to
establish the connection.
- Timeout
- The number of seconds that the client will wait for a response
before failing the operation. A value of zero indicates that the
client should wait an indefinite period of time. If this argument
is not specified, the value of the Timeout property will be
used as the default.
- Options
- A reserved parameter. This argument should either be omitted,
or always be zero.
Return Value
A value of zero is returned if the connection was successful.
Otherwise, a non-zero error code is returned which indicates the
cause of the failure.
See Also
HostAddress Property,
HostName Property, RemotePort Property, RemoteService Property,
Disconnect Method, OnConnect Event
|
|