Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The example that follows implements a synchronous HTTP relay. It uses a fixed size buffer, to avoid reading in the entire body so that the upstream connection sees a header without unnecessary latency. This example brings together all of the concepts discussed so far, it uses both a以下示例实现一个同步的 HTTP 中继。它使用固定大小的缓冲区,避免一次性读取整个消息体,从而使上游连接能够更及时地看到头部信息,减少不必要的延迟。该示例综合运用了此前讨论的所有概念,通过同时使用 __serializer__and a和 __parser__to achieve its goal:来实现目标: