Web-Server

所属分类:Windows编程
开发工具:Visual C++
文件大小:17KB
下载次数:18
上传日期:2015-12-29 17:13:10
上 传 者yangdaixu
说明:  vc web server 源码,支持http和https。
(vc web server source code.)

文件列表:
CMakeLists.txt (1815, 2015-12-09)
LICENSE (1088, 2015-12-09)
client_http.hpp (7972, 2015-12-09)
client_https.hpp (2036, 2015-12-09)
http_examples.cpp (6892, 2015-12-09)
https_examples.cpp (7028, 2015-12-09)
server_http.hpp (17116, 2015-12-09)
server_https.hpp (2438, 2015-12-09)
test (0, 2015-12-09)
test\CMakeLists.txt (361, 2015-12-09)
test\parse_test.cpp (3309, 2015-12-09)
web (0, 2015-12-09)
web\index.html (154, 2015-12-09)
web\test.html (153, 2015-12-09)

Simple-Web-Server ================= A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications. See also https://github.com/eidheim/Simple-WebSocket-Server for an easy way to make WebSocket/WebSocket Secure endpoints in C++. ### Features * Thread pool * Platform independent * HTTPS support * HTTP persistent connection (for HTTP/1.1) * Client supports chunked transfer encoding * Timeouts, if any of Server::timeout_request and Server::timeout_content are >0 (default: Server::timeout_request=5 seconds, and Server::timeout_content=300 seconds) * Simple way to add REST resources using regex for path, and anonymous functions * Possibility to flush response to clients synchronously (Server::Response::flush). ###Usage See http_examples.cpp or https_examples.cpp for example usage. See particularly the JSON-POST (using Boost.PropertyTree) and the GET /match/[number] examples, which are most relevant. The default_resource includes example use of Server::Response::flush. ### Dependencies * Boost C++ libraries * For HTTPS: OpenSSL libraries ### Compile and run Compile with a C++11 compliant compiler: ``` cmake . make ``` #### HTTP Run the server and client examples: `./http_examples` Direct your favorite browser to for instance http://localhost:8080/ #### HTTPS Before running the server, an RSA private key (server.key) and an SSL certificate (server.crt) must be created. Follow, for instance, the instructions given here (for a self-signed certificate): http://www.akadia.com/services/ssh_test_certificate.html Run the server and client examples: `./https_examples` Direct your favorite browser to for instance https://localhost:8080/

近期下载者

相关文件


收藏者