From bfc3b4b95b7af9c7a29a4e757d691b1fda9c25fc Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 15 Feb 2012 00:04:16 +0900 Subject: [PATCH] Updated README.rst --- README.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.rst b/README.rst index 3ca4838f..5b5ae863 100644 --- a/README.rst +++ b/README.rst @@ -100,3 +100,29 @@ serves static contents. It only speaks ``spdy/2``:: [id=1] [ 1.634] closed Currently, ``spdyd`` needs ``epoll`` or ``kqueue``. + +There is another SPDY server called ``spdynative``, which is +`node.native `_ style simple SPDY +server:: + + #include + + #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); + } + +Don't expect much from ``spdynative``. It is just an example and does +not support asynchronous I/O at all.