code: async def _connect(self, hostname, port, reconnect=False, channels=[],
                         encoding=protocol.DEFAULT_ENCODING, source_address=None):
          
          # Create connection if we can't reuse it.
          if not reconnect or not self.connection:
              self._autojoin_channels = channels
              self.connection = connection.Connection(hostname, port, source_address=source_address,
                                                      eventloop=self.eventloop)
              self.encoding = encoding
  
          # Connect.
          await self.connection.connect()
docs: Connect to IRC host.