illuminated-g / lv-msg-simple

Simple messaging layer that works with lv-stream based communication layers
MIT License
1 stars 0 forks source link

Support unregistering stream endpoints #4

Open negentropicdev opened 2 years ago

negentropicdev commented 2 years ago

This will allow reusing messaging instances when doing things like stopping & creating new underlying stream connections.

May also want to have a mechanism so that if a registered endpoint goes invalid it will automatically be unregistered within messaging. EG calling cleanup on a TCP Client to close a connection can be recognized by messaging and messaging will "unregister" it internally without having to be told to.

The Chat demo currently completely wipes the messaging manager and TCP client together (messaging cleans up the registered TCP client) to accomplish a user-directed disconnection. When connecting again both the messaging manager and the client need to be initialized and configured all over again.