miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
466 stars 110 forks source link

Add a receive buffer for messages #155

Open dannytrigo opened 3 months ago

dannytrigo commented 3 months ago

Prior to this, I was really struggling to receive dock.receiver-information=query responses using the async Receiver, because it runs with 0 timeout on the get calls. It would fail part way through a message, then the next attempt to get would throw an assertion failure because it was reading midway through that message and not finding the magic bytes.

This change adds a buffer where the data is held and only released once full eISCP packets are ready.