[WIP] feat: protocol handlers
Description
Notes & open questions
Change checklist
- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
This does not work out well this way. Instead our current idea is to expose the endpoint events not as a single callback, but as an (overflowing, non-lagging) broadcast stream. This would very much simplify the composition of protocols, as users won't have to merge their event listeners into a single callback, which needs to be passed to MagicEndpointBuilder (thus before MagicEndpoint exists, which makes the current state lead to chicken-and-egg problems)
https://github.com/n0-computer/iroh/pull/1847 should help to improve the startup story
Closing this. Needs more thought and is not on the immediate agenda.