Class PipeTransport
- Namespace
- PuppeteerSharp.Transport
- Assembly
- PuppeteerSharp.dll
Transport implementation using pipes for browser communication.
Used with Chrome's --remote-debugging-pipe flag, which communicates
via file descriptors 3 (browser reads) and 4 (browser writes).
Messages are null-terminated (\0) JSON strings.
public class PipeTransport : IConnectionTransport, IDisposable
- Inheritance
-
PipeTransport
- Implements
Constructors
PipeTransport(Stream, Stream)
Initializes a new instance of the PipeTransport class.
public PipeTransport(Stream pipeWrite, Stream pipeRead)
Parameters
pipeWriteStreamThe stream to write messages to (browser reads from this).
pipeReadStreamThe stream to read messages from (browser writes to this).
Properties
IsClosed
Gets a value indicating whether this IConnectionTransport is closed.
public bool IsClosed { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases resources used by the PipeTransport.
protected virtual void Dispose(bool disposing)
Parameters
SendAsync(byte[])
Sends a message using the transport.
public Task SendAsync(byte[] message)
Parameters
messagebyte[]Message to send.
Returns
- Task
The task.
Start()
Starts the background receive loop.
public void Start()
StopReading()
Stops reading incoming data.
public void StopReading()
Events
Closed
Occurs when the transport is closed.
public event EventHandler<TransportClosedEventArgs> Closed
Event Type
MessageReceived
Occurs when a message is received.
public event EventHandler<MessageReceivedEventArgs> MessageReceived