Interface ITethering
The Tethering domain defines methods and events for browser port binding.
[Experimental("BIDICDP001")]
public interface ITethering
Properties
Accepted
Informs that port was successfully bound and got a specified connection id.
IEventSource<AcceptedEventArgs> Accepted { get; }
Property Value
- IEventSource<AcceptedEventArgs>
Remarks
Event args (AcceptedEventArgs):
- Port - Port number that was successfully bound.
- ConnectionId - Connection id to be used.
Methods
BindAsync(long, string?, CancellationToken)
Request browser port binding.
Task<BindResult> BindAsync(long port, string? session = null, CancellationToken cancellationToken = default)
Parameters
portlongPort number to bind.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<BindResult>
A task representing the asynchronous operation, containing a BindResult.
UnbindAsync(long, string?, CancellationToken)
Request browser port unbinding.
Task<UnbindResult> UnbindAsync(long port, string? session = null, CancellationToken cancellationToken = default)
Parameters
portlongPort number to unbind.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<UnbindResult>
A task representing the asynchronous operation, containing a UnbindResult.