 | IProxyClientConnectAsync(String, Int32, CancellationToken) Method |
Asynchronously connect to the target host.
Namespace: MailKit.Net.ProxyAssembly: MailKit (in MailKit.dll) Version: 4.10.0
SyntaxTask<Stream> ConnectAsync(
string host,
int port,
CancellationToken cancellationToken = default
)
Parameters
- host String
- The host name of the target server.
- port Int32
- The target server port.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskStreamThe connected network stream.
Exceptions
Remarks
Asynchronously connects to the target host and port through the proxy server.
See Also