Class WindowsLoopbackPeerCheck
Provides who owns the far end of an IPv4 loopback connection on Windows: the process its TCP table row names.
public sealed class WindowsLoopbackPeerCheck : ILoopbackPeerCheck
- Inheritance
-
WindowsLoopbackPeerCheck
- Implements
- Inherited Members
Methods
IsOwnedBy(IPEndPoint, IPEndPoint, int, CancellationToken)
Checks whether the far end of a loopback connection belongs to a process, as far as the platform can tell.
public Task<bool> IsOwnedBy(IPEndPoint local, IPEndPoint remote, int processId, CancellationToken cancellationToken)
Parameters
localIPEndPointThe connection's local end.
remoteIPEndPointThe connection's remote end.
processIdintThe ID of the process meant to own the remote end.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
Remarks
The row may lag a connect by a moment, so it is read up to ten times, 10 ms apart, before the answer is no.
Exceptions
- OperationCanceledException
cancellationTokenwas canceled.- OperationCanceledException
cancellationTokenwas canceled.