Mercurial > public > mercurial-scm > hg
comparison mercurial/wireprotov2server.py @ 40129:293835e0fff7
wireprotov2: pass ui into clientreactor and serverreactor
This will allow us to use config options to influence compression
settings.
Differential Revision: https://phab.mercurial-scm.org/D4919
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 04 Oct 2018 17:17:57 -0700 |
parents | 9b19b8ce3804 |
children | 762ef19a07e3 |
comparison
equal
deleted
inserted
replaced
40128:57782791b7e9 | 40129:293835e0fff7 |
---|---|
154 res.setbodybytes(_('debugreflect service not available')) | 154 res.setbodybytes(_('debugreflect service not available')) |
155 return | 155 return |
156 | 156 |
157 # We assume we have a unified framing protocol request body. | 157 # We assume we have a unified framing protocol request body. |
158 | 158 |
159 reactor = wireprotoframing.serverreactor() | 159 reactor = wireprotoframing.serverreactor(ui) |
160 states = [] | 160 states = [] |
161 | 161 |
162 while True: | 162 while True: |
163 frame = wireprotoframing.readframe(req.bodyfh) | 163 frame = wireprotoframing.readframe(req.bodyfh) |
164 | 164 |
189 frames for evaluation. | 189 frames for evaluation. |
190 """ | 190 """ |
191 # TODO Some HTTP clients are full duplex and can receive data before | 191 # TODO Some HTTP clients are full duplex and can receive data before |
192 # the entire request is transmitted. Figure out a way to indicate support | 192 # the entire request is transmitted. Figure out a way to indicate support |
193 # for that so we can opt into full duplex mode. | 193 # for that so we can opt into full duplex mode. |
194 reactor = wireprotoframing.serverreactor(deferoutput=True) | 194 reactor = wireprotoframing.serverreactor(ui, deferoutput=True) |
195 seencommand = False | 195 seencommand = False |
196 | 196 |
197 outstream = reactor.makeoutputstream() | 197 outstream = reactor.makeoutputstream() |
198 | 198 |
199 while True: | 199 while True: |