-
Created an atomic_int connect_state that keeps track of not yet connected, connected, disconnected, and errors. Used to implement good error behavior when the server is down and you start() a Redox instance, or when the server goes down in the middle of running commands. Now, nothing should hang, but should return errors (or throw exceptions) when the server goes down. Also added hooks for a user connect/disconnect callback in the constructor, which is helpful for client programs. Added an example with three Redox clients in one thread.
-
Better than using a laptop, because it can be reproduced by others much more easily
-
Also plan to add in set<string> and unordered_set<string>. Maybe queue<string>. Looking at likely removing char* as an option, if it shows to be about the same speed as string.
-
Fixed a couple of bugs found with a test case of 100 parallel asynchronous clients. As of now, there are no known memory leaks, segfaults, or deadlocks in Redox.
-
Created a pointer Command.rdx (Redox*) to allow commands to increment Redox.cmd_count, and simplify a couple of other things. Did a little bit of moving and renaming context objects, so the context is always .ctx and commands can always be called c.
-
Renamed CommandAsync to Command to make things simpler, and refactored into its own file. command() now returns a pointer to the created Command object, which the client can pass into cancel() to stop any delayed or repeating calls. This is very important for an asynchronous client.