tosc-rs / mgnp

MnemOS Global Networking Protocol
Creative Commons Attribution Share Alike 4.0 International
14 stars 1 forks source link

feat: implement connection resets #31

Closed hawkw closed 8 months ago

hawkw commented 8 months ago

This branch implements connection-level resets, as described in #23.

In order to implement resets, I've added support for closing a tricky-pipe channel with a typed error. Both the sender and receiver can close the channel with an error, and when this occurs, both sides will return that error when receiving/sending. This allows us to easily propagate connection-level resets from the peer to a local client/server when a reset message is received on the wire.

I have not implemented global resets on wire-level errors yet. I plan to do that in a subsequent PR.