refactor. add stream implementations and make it so there is
less duplication when implementing SSL connections. just started
SSL.