PopClient.Connect Method (String, String, String)
Establish a connection with a remote host.
[Visual Basic]
Overloads Public Function Connect( _
ByVal hostName As String, _
ByVal userName As String, _
ByVal userPassword As String _
) As Boolean
[C#]
public bool Connect(
string hostName,
string userName,
string userPassword
);
Parameters
- hostName
- A string which specifies the remote host to establish a connection with. This may specify a host name or an Internet
address in dot-notation.
- userName
- A string which specifies the username which will be used to authenticate the client session with the remote host.
- userPassword
- A string which specifies the password which will be used to authenticate the client session with the remote host. If an
OAuth 2.0 authentication method has been specified, this parameter should specify the bearer token.
Return Value
A boolean value which specifies if the connection has been established. If the client is in blocking mode, a return value
of true indicates that the connection has completed and the application may send and receive data from the
remote host. If the client is in non-blocking mode, a return value of true indicates that the client has
successfully created a socket and the connection is in progress.
When a non-blocking connection has completed, the OnConnect event will
be fired. If this method returns false, the connection could not be established and the application should
check the value of the LastError property to determine the cause of the
failure.
See Also
PopClient Class |
SocketTools Namespace |
PopClient.Connect Overload List