original_docstring: Get a _SocketConnection to a peer represented by url.
docstring: Get a _SocketConnection to a peer represented by url.
docstring_tokens: Get a _SocketConnection to a peer represented by url .
code: def connect(self, host, handler, properties):
          """Get a _SocketConnection to a peer represented by url."""
          key = "openstack.org/om/connection/%s:%s/" % (host.hostname, host.port)
          # return pre-existing
          conn = self._container.get_connection(key)
          if conn:
              return conn.user_context
  
          # create a new connection - this will be stored in the
          # container, using the specified name as the lookup key, or if
          # no name was provided, the host:port combination
          sc = _SocketConnection(key, self._container,
                                 properties, handler=handler)
          sc.connect(host)
          self._connection = sc
          return sc
code_tokens: def connect ( self , host , handler , properties ) : key = "openstack.org/om/connection/%s:%s/" % ( host . hostname , host . port ) conn = self . _container . get_connection ( key ) if conn : return conn . user_context sc = _SocketConnection ( key , self . _container , properties , handler = handler ) sc . connect ( host ) self . _connection = sc return sc
short_docstring: Get a _SocketConnection to a peer represented by url.
short_docstring_tokens: Get a _SocketConnection to a peer represented by url .
comment: """Get a _SocketConnection to a peer represented by url."""$SEP$# return pre-existing$SEP$# create a new connection - this will be stored in the$SEP$# container, using the specified name as the lookup key, or if$SEP$# no name was provided, the host:port combination