Socks |
public override Task<Stream> ConnectAsync( string host, int port, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | host is null. |
ArgumentOutOfRangeException | port is not between 0 and 65535. |
ArgumentException | The host is a zero-length string. |
OperationCanceledException | The operation was canceled via the cancellation token. |
SocketException | A socket error occurred trying to connect to the remote host. |
IOException | An I/O error occurred. |