jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
This commit is contained in:
parent
5cee4fbab7
commit
76aadbb3fb
1 changed files with 3299 additions and 3300 deletions
|
|
@ -175,17 +175,8 @@ ProxyInfos = namedtuple("ProxyInfos", ["host", "jid", "port"])
|
|||
|
||||
|
||||
class Candidate(object):
|
||||
def __init__(
|
||||
self,
|
||||
host,
|
||||
port,
|
||||
type_,
|
||||
priority,
|
||||
jid_,
|
||||
id_=None,
|
||||
priority_local=False,
|
||||
factory=None,
|
||||
):
|
||||
def __init__(self, host, port, type_, priority, jid_, id_=None, priority_local=False,
|
||||
factory=None,):
|
||||
"""
|
||||
@param host(unicode): host IP or domain
|
||||
@param port(int): port
|
||||
|
|
@ -227,15 +218,6 @@ class Candidate(object):
|
|||
return self._priority
|
||||
|
||||
def __str__(self):
|
||||
# similar to __unicode__ but we don't show jid and we encode id
|
||||
return "Candidate ({0.priority}): host={0.host} port={0.port} type={0.type}{id}".format(
|
||||
self,
|
||||
id=" id={}".format(self.id if self.id is not None else "").encode(
|
||||
"utf-8", "ignore"
|
||||
),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
return "Candidate ({0.priority}): host={0.host} port={0.port} jid={0.jid} type={0.type}{id}".format(
|
||||
self, id=" id={}".format(self.id if self.id is not None else "")
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue