| 158 | HttpConnection& client; |
| 159 | |
| 160 | void operator()(AsyncBufferView::ID bufferID) { pself.onStreamReceive(client, bufferID); } |
| 161 | }; |
| 162 | |
| 163 | struct HttpAsyncServer::EventBodyDataListener |
| 164 | { |
| 165 | HttpAsyncServer& pself; |
| 166 | HttpConnection& client; |
| 167 | |
| 168 | void operator()(AsyncBufferView::ID bufferID) { pself.onRequestBodyData(client, bufferID); } |
| 169 | }; |
| 170 | |
| 171 | struct HttpAsyncServer::EventEndListener |
| 172 | { |
| 173 | HttpAsyncServer& pself; |
| 174 | HttpConnection& client; |
| 175 | |
| 176 | void operator()() |
| 177 | { |
| 178 | // A peer may half-close after sending a complete request and still wait for the response. |
| 179 | if (client.request.hasReceivedHeaders() and client.request.isBodyComplete()) |
| 180 | { |
| 181 | return; |
| 182 | } |
| 183 | pself.closeAsync(client); |
| 184 | } |
| 185 | }; |
| 186 | |
| 187 | struct HttpAsyncServer::EventCloseListener |
| 188 | { |
| 189 | HttpAsyncServer& pself; |
| 190 | HttpConnection& client; |
| 191 | |
| 192 | void operator()() |
| 193 | { |
| 194 | // Upgraded owners may destroy streams directly on protocol errors. |
| 195 | pself.closeAsync(client); |
| 196 | } |
| 197 | }; |
| 198 |
nothing calls this directly
no test coverage detected