added the initialize() static method

moved some constructor code in the initialize() method

added chunked transfer-econoding support to socketSend() method