Great to see a ConnectionManager library being released. In the absence of this, I’ve implemented something very similar for use with our devices.
A word of warning about the use of the log() method though. Squirrel is not the most economical when it comes to object RAM use. I buffer messages and events in the device while the device is offline and available RAM can evaporate preeeetty quickly. I’ve had to put a limit on the number of messages held. I’ve even put a JSON (en/de)coder in the device which allows me to convert tables to JSON strings for storage, which I reconstitute when needed.
This actually brings up a little side-thing I’ve been working on. Since sizeof() deosn’t exist for Squirrel, I’ve been piecing together a routine that traverses objects and calculates (roughly) their RAM use. I have a few structures that are many 10s of kilobytes in size and I’m keen to know which structures work better than others wrt RAM use.