def connect(self, blocking=False, retry=<NUM_LIT:30>):
if self._connected:<EOL><INDENT>return<EOL><DEDENT>while True:<EOL><INDENT>try:<EOL><INDENT>self._connect()<EOL>if not self.skip_login:<EOL><INDENT>self._send_login()<EOL><DEDENT>break<EOL><DEDENT>except (LoginError, ConnectionError):<EOL><INDENT>if not blocking:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>self.logger.info("<STR_LIT>" % retry)<EOL>time.sleep(retry)<EOL><DEDENT>
Initiate connection to APRS server and attempt to login

blocking = False     - Should we block until connected and logged-in
retry = 30           - Retry interval in seconds