(self, host, port=10011,
             timeout=socket._GLOBAL_DEFAULT_TIMEOUT)
return None
Connect to the TS3 Server listening on the address given by the
        *host* and *port* parmeters. If *timeout* is provided, this is the
        maximum time in seconds for the connection attempt.

        :raises OSError:
            If the client is already connected.
        :raises TimeoutError:
            If the connection can not be created.
Connect to the TS3 Server listening on the address given by the
        *host* and *port* parmeters. If *timeout* is provided, this is the
        maximum time in seconds for the connection attempt.
Connect to the TS3 Server listening on the address given by the * host * and * port * parmeters . If * timeout * is provided this is the maximum time in seconds for the connection attempt .
def open(self, host, port=10011,
             timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
        """
        Connect to the TS3 Server listening on the address given by the
        *host* and *port* parmeters. If *timeout* is provided, this is the
        maximum time in seconds for the connection attempt.

        :raises OSError:
            If the client is already connected.
        :raises TimeoutError:
            If the connection can not be created.
        """
        if self.is_connected():
             raise OSError("The client is already connected.")
        else:
            self._telnet_conn = telnetlib.Telnet(host, port, timeout)
            self._telnet_queue = list()

            # Wait for the first and the second greeting:
            # b'TS3\n\r'
            # b'Welcome to the [...] on a specific command.\n\r'
            self._telnet_conn.read_until(b"\n\r")
            self._telnet_conn.read_until(b"\n\r")

            self._num_pending_queries = 0
            self._event_queue = list()

            _logger.info("Created connection to {}:{}.".format(host, port))
        return None
def open ( self , host , port = 10011 , timeout = socket . _GLOBAL_DEFAULT_TIMEOUT ) : if self . is_connected ( ) : raise OSError ( "The client is already connected." ) else : self . _telnet_conn = telnetlib . Telnet ( host , port , timeout ) self . _telnet_queue = list ( ) # Wait for the first and the second greeting: # b'TS3\n\r' # b'Welcome to the [...] on a specific command.\n\r' self . _telnet_conn . read_until ( b"\n\r" ) self . _telnet_conn . read_until ( b"\n\r" ) self . _num_pending_queries = 0 self . _event_queue = list ( ) _logger . info ( "Created connection to {}:{}." . format ( host , port ) ) return None