def METHOD_NAME(self):
    """Connect to clamd for stream scanning.
    @return: tuple (connected socket, host)
    """
    if self.get('LocalSocket'):
        host = 'localhost'
        sock = self.create_local_socket()
    elif self.get('TCPSocket'):
        host = self.get('TCPAddr', 'localhost')
        sock = self.create_tcp_socket(host)
    else:
        raise ClamavError(_("one of TCPSocket or LocalSocket must be enabled"))
    return sock, host