chiark / gitweb /
py/tripe.py.in: Complete the docstring for `TripeCommandDispatcher'.
[tripe] / py / tripe.py.in
index 37de5a404de6aff7f87037aee85ff742db52cb39..fca38102500854181115a7c2ced84d48b20114e2 100644 (file)
@@ -663,7 +663,10 @@ class TripeCommandDispatcher (TripeConnection):
 
   The dispatcher also has a special response code of its own: CONNERR
   indicates that the connection failed and the command has therefore been
-  lost; the
+  lost.  This is sent to all outstanding commands when a connection error is
+  encountered: rather than a token list, it is accompanied by an exception
+  object which is the cause of the disconnection, which may be `None' if the
+  disconnection is expected (e.g., the direct result of a user request).
   """
 
   ## --- Infrastructure ---
@@ -831,13 +834,15 @@ class TripeCommandDispatcher (TripeConnection):
     return _simple(me.command(bg = True,
                               *['ADD'] +
                               _kwopts(kw, ['tunnel', 'keepalive',
-                                           'key', 'cork']) +
+                                           'key', 'priv', 'cork',
+                                           'mobile']) +
                               [peer] +
                               list(addr)))
   def addr(me, peer):
     return _oneline(me.command('ADDR', peer))
-  def algs(me):
-    return _keyvals(me.command('ALGS'))
+  def algs(me, peer = None):
+    return _keyvals(me.command('ALGS',
+                               *((peer is not None and [peer]) or [])))
   def checkchal(me, chal):
     return _simple(me.command('CHECKCHAL', chal))
   def daemon(me):