libh2o

2015/04/14 Kiyoshi Nomo

at http2 RFC 発行記念 祝賀飲み会 + LT 大会

Congraturations!!!

All of the implementers who attended interop events, and in particular the Japanese HTTP/2 community, whose contributions were of extremely high quality and consistency.

 

https://www.mnot.net/blog/2015/02/18/http2

About me

  • @kysnm
  • Job: Ruby on Rails
  • Hobby: Node.js/io.js, C++, C, etc…
  • 東京Node学園祭実行員

h2o

- an optimized HTTP server with support for HTTP/1.x and HTTP/2

H2O is a very fast HTTP server written in C. It can also be used as a library.

Building the Library

$ cmake .
$ make libh2o

Makefile

➜  h2o git:(master) ✗ make help
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... check
... edit_cache
... examples-http1client
... examples-simple
... examples-socket-client
... examples-websocket
... h2o
... install
... install/local
... install/strip
... lib-examples
... libh2o

Text

lib-examples!

examples/libh2o/simple.c

    /* disabled by default: uncomment the block below to use HTTPS instead of HTTP */
    /*
    if (setup_ssl("server.crt", "server.key") != 0)
        goto Error;
    */

    /* disabled by default: uncomment the line below to enable access logging */
    /* h2o_access_log_register(&config.default_host, "/dev/stdout", NULL); */
➜  h2o git:(master) ✗ ./examples-simple

Chrome M39 では spdy/4 を有効にしても ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY というエラーでアクセスできません. これは Chrome が AEAD 暗号化スイートを要求するのに対し, Erlang の ssl モジュールがそれに非対応だからです (この制限は, HTTP/2 仕様からは取り除かれる可能性があります). Firefox も同様ですが, about:config で network.http.spdy.enforce-tls-profile を false にするとこの制限を外すことができてアクセス可能になります.

 

http://qiita.com/tatsuhiro-t/items/a44a6573e6a54ef599f1

I made ruby bindings

This library is still under development and considered ALPHA quality.

Currently only for Mac

!!!

Reference

Thanks!!!

Made with Slides.com