Show More
@@ -327,19 +327,38 b' class wirepeer(peer.peerrepository):' | |||||
327 |
|
327 | |||
328 | # server side |
|
328 | # server side | |
329 |
|
329 | |||
|
330 | # wire protocol command can either return a string or one of these classes. | |||
330 | class streamres(object): |
|
331 | class streamres(object): | |
|
332 | """wireproto reply: binary stream | |||
|
333 | ||||
|
334 | The call was successful and the result is a stream. | |||
|
335 | Iterate on the `self.gen` attribute to retrieve chunks. | |||
|
336 | """ | |||
331 | def __init__(self, gen): |
|
337 | def __init__(self, gen): | |
332 | self.gen = gen |
|
338 | self.gen = gen | |
333 |
|
339 | |||
334 | class pushres(object): |
|
340 | class pushres(object): | |
|
341 | """wireproto reply: success with simple integer return | |||
|
342 | ||||
|
343 | The call was successful and returned an integer contained in `self.res`. | |||
|
344 | """ | |||
335 | def __init__(self, res): |
|
345 | def __init__(self, res): | |
336 | self.res = res |
|
346 | self.res = res | |
337 |
|
347 | |||
338 | class pusherr(object): |
|
348 | class pusherr(object): | |
|
349 | """wireproto reply: failure | |||
|
350 | ||||
|
351 | The call failed. The `self.res` attribute contains the error message. | |||
|
352 | """ | |||
339 | def __init__(self, res): |
|
353 | def __init__(self, res): | |
340 | self.res = res |
|
354 | self.res = res | |
341 |
|
355 | |||
342 | class ooberror(object): |
|
356 | class ooberror(object): | |
|
357 | """wireproto reply: failure of a batch of operation | |||
|
358 | ||||
|
359 | Something failed during a batch call. The error message is stored in | |||
|
360 | `self.message`. | |||
|
361 | """ | |||
343 | def __init__(self, message): |
|
362 | def __init__(self, message): | |
344 | self.message = message |
|
363 | self.message = message | |
345 |
|
364 |
General Comments 0
You need to be logged in to leave comments.
Login now