Class AddressFamilyConnector
Provides a TCP connection over one address family, whatever the OS prefers, for an HTTP handler's
ConnectCallback, so the web service sees the caller's address of that family.
public static class AddressFamilyConnector
- Inheritance
-
AddressFamilyConnector
- Inherited Members
Methods
Connect(DnsEndPoint, AddressFamily, CancellationToken)
Connects to a host over an address family.
public static ValueTask<Stream> Connect(DnsEndPoint endPoint, AddressFamily addressFamily, CancellationToken cancellationToken)
Parameters
endPointDnsEndPointThe host and port.
addressFamilyAddressFamilyThe address family.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- SocketException
The connection failed, as when the host has no address of the family.
- OperationCanceledException
cancellationTokenwas canceled.