-
Made redox into a more formal package with CMake. It now by default builds a dynamic library in release mode. Tests and examples can be enabled with options. Added semantic versioning. Documented the install from source procedure which is very easy, just make and make install. Users now have to just link one library (redox) and include one header (redox.hpp), and the rest is linked from those. Used CPack to add capability to create a debian package. Useful for getting it into the apt repos. Also redid the readme introduction.
-
Implemented limited but useful binary data support without breaking the API. If the last character of the command is a ", look for the first ", and everything in between the quotes treat as binary data. Takes care of setting a key with a binary value. Not useful if there need to be multiple binary entries in one command, or for binary keys. Also need to be careful if the last character of the value actually needs to be a quote, in which case we need to quote the value.
-
Added GTest under test/. Great for unit testing commands. Added some nice helper functions to make writing tests easy. Added options to CMakeLists to build the library, tests, and examples separately, configurable through ccmake. Also default the build type to RelWithDebInfo, but don't override user settings.
-
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.