##// END OF EJS Templates
wireprotoserver: rename abstractserverproto and improve docstring...
Gregory Szorc -
r36006:04231e89 default
parent child Browse files
Show More
@@ -38,10 +38,13 b" SSHV1 = 'ssh-v1'"
38 # to reflect BC breakages.
38 # to reflect BC breakages.
39 SSHV2 = 'exp-ssh-v2-0001'
39 SSHV2 = 'exp-ssh-v2-0001'
40
40
41 class abstractserverproto(object):
41 class baseprotocolhandler(object):
42 """abstract class that summarizes the protocol API
42 """Abstract base class for wire protocol handlers.
43
43
44 Used as reference and documentation.
44 A wire protocol handler serves as an interface between protocol command
45 handlers and the wire protocol transport layer. Protocol handlers provide
46 methods to read command arguments, redirect stdio for the duration of
47 the request, handle response types, etc.
45 """
48 """
46
49
47 __metaclass__ = abc.ABCMeta
50 __metaclass__ = abc.ABCMeta
@@ -104,7 +107,7 b' def decodevaluefromheaders(req, headerpr'
104
107
105 return ''.join(chunks)
108 return ''.join(chunks)
106
109
107 class webproto(abstractserverproto):
110 class webproto(baseprotocolhandler):
108 def __init__(self, req, ui):
111 def __init__(self, req, ui):
109 self._req = req
112 self._req = req
110 self._ui = ui
113 self._ui = ui
@@ -333,7 +336,7 b' def _handlehttperror(e, req, cmd):'
333
336
334 return ''
337 return ''
335
338
336 class sshserver(abstractserverproto):
339 class sshserver(baseprotocolhandler):
337 def __init__(self, ui, repo):
340 def __init__(self, ui, repo):
338 self._ui = ui
341 self._ui = ui
339 self._repo = repo
342 self._repo = repo
General Comments 0
You need to be logged in to leave comments. Login now