implement **kwargs and include socket in Connection class