非死book的 C++ HTTP 庫:Proxygen
該項目包括</span> 非死book使用</span></span></span>的</span></span></span></span></span>核心</span> C++抽象HTTP。在內部,它被用作</span>構建HTTP服務器,代理服務器和客戶端</span></span>的基礎庫。本次發布的重點是常見的HTTP抽象和簡單的HttpServer框架。未來版本將提供簡單的客戶端API。該框架支持HTTP/1.1,SPDY/3,和SPDY/3.1。 HTTP /2支持正在進行中。我們的目標是提供一個簡單,高性能,以及現代的C++ HTTP庫。 目錄結構和內容:
</span>
proxygen/external/
Contains non-installed 3rd-party code proxygen depends on.proxygen/lib/
Core networking abstractions.proxygen/lib/http/
HTTP specific code.proxygen/lib/services/
Connection management and server code.proxygen/lib/ssl/
TLS abstractions and OpenSSL wrappers.proxygen/lib/utils/
Miscellaneous helper code.proxygen/httpserver/
Contains code wrappingproxygen/lib/
for building simple C++ http servers. We recommend building on top of these APIs.
</ul>
架構
基礎組件是HTTPServer
, RequestHandlerFactory
, 和 RequestHandler。
An HTTPServer
takes some configuration and is given aRequestHandlerFactory
. Once the server is started, the installedRequestHandlerFactory
spawns a RequestHandler
for each HTTP request. RequestHandler
is a simple interface users of the library implement. Subclasses of RequestHandler
should use the inherited protected member ResponseHandler* downstream_
to send the response.
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!