erock2112/HomeAuto — Issue #6: Update Server to use WebSockets
Author: erock2112
Created: 2012-03-04 04:52:01+00:00
State: open

This will be a "finished" server, which opens on a port specified on command line,
It should use WebSockets, which will make access from HTML5 nice and easy.
Should use encryption.
Receives a message beginning with a service name which is followed by some command that the service will understand.
Sends that message to the named service (if it exists and we can connect), but without the service name.
Receives a response from the service.
Sends a response back over the WebSocket indicating success or failure, along with some data.
Should make this asynchronous, but place mutexes on anything that will be written. Since the services are likely to be synchronous, single-threaded apps, the multithreading should take place in this component, and we need to make sure that only one thread WRITES to a service at a time. This may be tough as it requires some interpretation of the message we're sending to the service, so we could settle for synchronous for now.