Class DataStreamChannel
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
outputKeybyte[]The key used to encrypt outgoing data.
inputKeybyte[]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
The listener notified of incoming protobuf messages and connection loss.
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
SendProtobuf(ProtocolMessage)
Serialize a protobuf message and send it to the receiver.
public void SendProtobuf(ProtocolMessage message)
Parameters
messageProtocolMessageThe message to send.