Table of Contents

Class DataStreamChannel

Namespace
AppleTvControlLibrary.Mrp.AirPlay.Channels
Assembly
AppleTvControlLibrary.Mrp.dll

The AirPlay 2 data-stream channel: a HAP-encrypted TCP connection that tunnels MRP protobuf messages wrapped in a fixed binary header plus a binary-plist envelope.

public sealed class DataStreamChannel : AbstractHapChannel, IDisposable
Inheritance
DataStreamChannel
Implements
Inherited Members

Constructors

DataStreamChannel(byte[], byte[])

Initializes a new instance of the DataStreamChannel class.

public DataStreamChannel(byte[] outputKey, byte[] inputKey)

Parameters

outputKey byte[]

The key used to encrypt outgoing data.

inputKey byte[]

The key used to decrypt incoming data.

Properties

Listener

Gets or sets the listener notified of incoming protobuf messages and connection loss.

public IDataStreamListener? Listener { get; set; }

Property Value

IDataStreamListener

Methods

HandleReceived()

Handle received data that was put in the buffer.

protected override void HandleReceived()

OnConnectionLost(Exception?)

Device connection was dropped.

protected override void OnConnectionLost(Exception? exception)

Parameters

exception Exception

The exception that caused the drop, or null for a clean close.

SendProtobuf(ProtocolMessage)

Serialize a protobuf message and send it to the receiver.

public void SendProtobuf(ProtocolMessage message)

Parameters

message ProtocolMessage

The message to send.