working fine, no bugs
cleaned code
refactored socketsInit and how it handles the ready object, delays 100ms to avoid pushing/send issue when socket is closed abruptly
refactored the observer names to add a suffix be more clear like <listening> for sockets and <inbound> and <outbound> for consumers
add better examples two consumers and socket example and duplex example
refactored amend methods
added transport validation
changed default name spaces to all start with _ to avoid accidential namespace issues
refactored examples to showcase all possibilities with a four in one (fio) example
refactored ha hooks
added matching websocket client
all works changes made by one socket are pushed to all sockets where they do their updates including home assistant
added a home assistant package file including lovelace yaml for matching HA interface.
changed default commands handling, removed _default namespace
changed s and c name spaces to use ._c, and _s as default name spaces
amend commands work with above ._c and ._s props
changed .socket to ._socket to avoid namespace issues with instances using .socket. Instances should use the getSocket method!
copied host and port options to connect. for mqtt socket to make setting those more standard
cleaned up logging
Add hooking for before send, and before and after process
Improved/cleaned preempting default processing
by default removed root namespace checking must now set useRootNS to true to access command functions there. This to avoid issuess like an 'on' function clashing with an emitter listerner.
send now transport send now process as many consumer sockets as have been created by pushing them onto array and the using promise.all and map to send out together.
Return for one than one is an array of responses.
getPacketByName was added to make it easy to grab just one of those in returned array.
improved socket packet processing call now binds this and name of socket that received packet for processing
single common processor for all packets incoming (either consumer or socket)
default processing splits into socket or consumer
default processing has calls looking for packet cmd functions before returning error packet
1. Added Namespace // TODO
2. A Pariticular Sockect
3. Root of instance
4. The socket type and transport //TODO
5. The socket type
there are helper functions for adding cmd functions to any of these save the root instance we you can add directly.