| IProxyClientConnect(String, Int32, CancellationToken) Method |
Connect to the target host.
Namespace: MailKit.Net.ProxyAssembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax Stream Connect(
string host,
int port,
CancellationToken cancellationToken = default
)
Parameters
- host String
- The host name of the proxy server.
- port Int32
- The proxy server port.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
StreamThe connected network stream.
Exceptions Remarks
Connects to the target host and port through the proxy server.
See Also