':param address: the address to which the connection will be established
:param port: the port to which the connection will be established.
Default is 25333.
:param auto_close: if `True`, the connection closes the socket when it
is garbage collected.
:param gateway_property: contains gateway preferences to avoid a cycle
with gateway'

def __init__(self, address=DEFAULT_ADDRESS, port=25333, auto_close=True, gateway_property=None):

    self.address = address
    self.port = port
    self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.is_connected = False
    self.auto_close = auto_close
    self.gateway_property = gateway_property
    self.wr = weakref.ref(self, (lambda wr, socket_instance=self.socket: _garbage_collect_connection(socket_instance)))
