pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Support for transaction messages in MRP

Open postlund opened this issue 5 years ago • 0 comments

Short feature/function description The exact purpose of transaction messages is still a bit unclear to me, but they seem to carry other messages and allows splitting them over several protocol messages.

MRP already allows segmentation since data is treated as a stream, with a prefix length hinting at how large a message is. This however means that one large message will delay other messages during transfer. Since one transaction message is a complete message in itself, other messages can be sent between each transaction message. This gives the benefit of being able to handle for instance touch events while at the same time transferring large artwork, without imposing any noticeable delay for the user. So I guess this kinda answers my initial concerns.

What needs to be done? Each transaction needs its own buffer. I also need to figure out when transactions are used, when and where to extract the message as well as when to free the buffers.

Is this a breaking change? No

Anything else worth knowing? This issue was spawned from #609 and more details are in there.

postlund avatar Jun 08 '20 07:06 postlund