Commit 761cb970 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update README.rst

parent dcc7b239
...@@ -47,8 +47,7 @@ implementation. ...@@ -47,8 +47,7 @@ implementation.
NPN offer ``h2-14``, ``spdy/3.1`` and ``http/1.1``. NPN offer ``h2-14``, ``spdy/3.1`` and ``http/1.1``.
This endpoint requires TLSv1.2 and DHE or EDCHE with GCM cipher This endpoint requires TLSv1.2 for HTTP/2 connection.
suite for HTTP/2 connection.
* http://nghttp2.org/ (Upgrade / Direct) * http://nghttp2.org/ (Upgrade / Direct)
...@@ -997,15 +996,11 @@ HTTP/2 server looks like this: ...@@ -997,15 +996,11 @@ HTTP/2 server looks like this:
using namespace nghttp2::asio_http2; using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server; using namespace nghttp2::asio_http2::server;
int main(int argc, char* argv[]) int main(int argc, char *argv[]) {
{
http2 server; http2 server;
server.listen server.listen("*", 3000, [](const std::shared_ptr<request> &req,
("*", 3000, const std::shared_ptr<response> &res) {
[](const std::shared_ptr<request>& req,
const std::shared_ptr<response>& res)
{
res->write_head(200); res->write_head(200);
res->end("hello, world"); res->end("hello, world");
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment