parameters: (self)
docstring: Close the underlying connection.
docstring_summary: Close the underlying connection.
docstring_tokens: Close the underlying connection .
function: def close(self):
          """Close the underlying connection."""
          self._closed = True
          if self.receive_task:
              self.receive_task.cancel()
          if self.connection:
              self.connection.close()
function_tokens: def close ( self ) : self . _closed = True if self . receive_task : self . receive_task . cancel ( ) if self . connection : self . connection . close ( )