C语言的SPDY开发包 spdylay

fmms 12年前

spdylay 是 C 语言实现对 SPDY v2/3 协议支持的库

示例代码:

#include <iostream>    #include "spdy.h"    int main()  {    spdy server;    if(!server.listen("localhost", 8080, "server.key", "server.crt",                      [](request& req, response& res) {                        res.set_status(200);                        res.set_header("content-type", "text/plain");                        res.end("C++ FTW\n");                      }))      return EXIT_FAILURE;      std::cout << "Server running at http://localhost:8080/" << std::endl;    return reactor::run(server);  }

项目主页:http://www.open-open.com/lib/view/home/1336867114260