Connect to a remote or local gpiod daemon.
        :param address: a pair (address, port), the address must be already
        resolved (for example an ip address)
        :return:

def connect(self, address):
        """
        Connect to a remote or local gpiod daemon.
        :param address: a pair (address, port), the address must be already
        resolved (for example an ip address)
        :return:
        """
        self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.s.setblocking(False)
        # Disable the Nagle algorithm.
        self.s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

        yield from self._loop.sock_connect(self.s, address)

        yield from self._notify._connect(address)