Interface IMrpFrameConnection
- Namespace
- AppleTvControlLibrary.Mrp.Connection
- Assembly
- AppleTvControlLibrary.Mrp.dll
Abstraction over the piece of MrpProtocol that turns a serialized protobuf payload into whatever bytes actually need to be transmitted, and vice versa. This is what lets MrpProtocol be driven by an AirPlay-tunneled connection (HAP-channel framing/encryption) or, historically, a raw-TCP connection.
public interface IMrpFrameConnection
Remarks
Mirrors pyatv's AbstractMrpConnection (pyatv/protocols/mrp/connection.py — line 16-37
as of pyatv 0.18.0), trimmed to the members MrpProtocol actually depends on;
pyatv's connect/connected/close are transport-lifecycle concerns owned
by the transport classes in this port, not by this interface.
Properties
Listener
Gets or sets the listener notified when a complete message has been received and decoded.
IMrpConnectionListener? Listener { get; set; }
Property Value
Methods
BuildMessage(byte[])
Build a message ready to send from a serialized protobuf payload.
byte[] BuildMessage(byte[] data)
Parameters
databyte[]The serialized protobuf message payload.
Returns
- byte[]
The bytes to write to the transport.
EnableEncryption(byte[], byte[])
Enable encryption with the specified keys.
void EnableEncryption(byte[] outputKey, byte[] inputKey)