Interface ILoopbackPeerCheck
Defines how a process checks that the far end of a loopback connection it made belongs to the process it meant to reach, as far as the platform can tell.
public interface ILoopbackPeerCheck
Remarks
The service frees a dead listener's port before its channel names the next, and anyone may take it. Windows reads the owning process from its TCP table; Linux checks the owning user; the Windows plug-in, whose app runs in the window's process, checks only that the process meant is this one.
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.
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
Exceptions
- OperationCanceledException
cancellationTokenwas canceled.