Comments
Patch
@@ -370,10 +370,48 @@ class wirepeer(peer.peerrepository):
opts['three'] = three
if four is not None:
opts['four'] = four
return self._call('debugwireargs', one=one, two=two, **opts)
+ def _call(self, cmd, **args):
+ """execute <cmd> on the server
+
+ The command is expected to return a simple string.
+
+ return server reply as a string."""
+ raise NotImplementedError()
+
+ def _callstream(self, cmd, **args):
+ """execute <cmd> on the server
+
+ The command is expectid to return a stream.
+
+ return server reply as a file like object."""
+ raise NotImplementedError()
+
+ def _callpush(self, cmd, fp, **args):
+ """execute a <cmd> on server
+
+ The command is expected to be related to a push. Push having special
+ return method.
+
+ return server reply as (ret, output) tuple. ret is either empty (error)
+ or a stringified int.
+ """
+ raise NotImplementedError()
+
+ def _abort(self, exception):
+ """clearly abort the wire protocol connection and raise the exception
+ """
+ raise NotImplementedError()
+
+
+ def _decompress(self, stream):
+ """decompress a received stream
+ """
+ raise NotImplementedError()
+
# server side
# wire protocol command can either return a string or one of this class.
class streamres(object):
"""wireproto reply: binary stream