redding/dat-tcp — pull request #30 by jcredding (2013-10-08 21:01:35+00:00)
Title: Add state query methods, protect with `Mutex` lock

This adds query methods for a server's "state". These are used
internally by the `Server` class but are also available as public
methods for querying the server's state. This also adds mutex
locking for the state. This is done because it's a common
practice for multiple threads to read/modify the the state via
the commands and query methods. This is also true via signal
trapping which can modify the state. This is a more robust
implementation of the internal "state" of the server that was
pulled from `Qs`.