completed reorg of client, it now works for ssl and non-ssl by way of a template which is hidden behind a abstract base class pointer and a factory