Skip to content

0.3.0

Compare
Choose a tag to compare
@insidegui insidegui released this 08 Jul 23:16
8dd6524

Receiver blocks now receive the Peer the message was sent from. This is a breaking change to the API, but it's very easy to account for in your code.

If you were previously doing something like this:

transceiver.receive(SomeCodableThing.self) { payload in
    // handle
}

All you have to do is ignore the sender parameter in the closure, like so:

transceiver.receive(SomeCodableThing.self) { payload, _ in
    // handle
}