UNIX socket API needs to have method for reporting state changes. Needs line buffering and some JSON-RPC like interface