internal/pipewire: rename context consume method

This name is more correct since it does not roundtrip, but receives messages. This is also more consistent with the method on event proxies.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-06 16:44:39 +09:00
parent 8a2f9edcf9
commit 2b22efcdf1

View File

@@ -536,7 +536,7 @@ func (ctx *Context) Roundtrip() (err error) {
var remaining []byte
for {
remaining, err = ctx.roundtrip(remaining)
remaining, err = ctx.consume(remaining)
if err == nil {
continue
}
@@ -554,8 +554,8 @@ func (ctx *Context) Roundtrip() (err error) {
}
}
// roundtrip receives messages from the server and processes events.
func (ctx *Context) roundtrip(receiveRemaining []byte) (remaining []byte, err error) {
// consume receives messages from the server and processes events.
func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err error) {
var (
// this holds onto non-protocol errors encountered during event handling;
// errors that prevent event processing from continuing must be panicked