added threading support and other control attributes

The client now runs as a thread that doesn';t block the main
application. This allows you to branch out any number of clients on
different ports.
I also added several service function that allow apps to pull live data
streams or dump the data on demand to an output file