Commit Graph

10 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 88599228f8 Prefer spdy/3 to spdy/2 in spdylay_select_next_protocol() 2012-05-12 18:23:17 +09:00
Tatsuhiro Tsujikawa 9e716eb635 Code cleanup: C89 and old-style-prototypes and definition. 2012-03-23 02:17:48 +09:00
Tatsuhiro Tsujikawa 8fd2fabef8 Made spdylay_select_next_protocol() return SPDY protocol version if one of
SPDY versions is selected.
2012-03-02 22:52:01 +09:00
Tatsuhiro Tsujikawa 0a723aa10f Added spdylay_npn_get_version() 2012-02-26 01:30:41 +09:00
Tatsuhiro Tsujikawa 8fac259285 For non-overlap case, made out and outlen left untouched 2012-02-09 22:46:26 +09:00
Tatsuhiro Tsujikawa 656a4b6e72 Fixed compiler warning 2012-02-08 21:49:15 +09:00
Tatsuhiro Tsujikawa b8700259fd Changed behaviour of spdylay_select_next_protocol()
We use following algorithm to select protocol:

 1. If server's list contains "spdy/2", this function selects
    "spdy/2" and returns 1. The following steps are not taken.

 2. If server's list contains "http/1.1", this function selects
    "http/1.1" and returns 0. The following step is not taken.

 3. This function selects "spdy/2" and returns -1. (So called
    non-overlap case).
2012-02-08 21:20:50 +09:00
Tatsuhiro Tsujikawa d0cd362852 Changed spdylay_select_next_protocol behaviour
It now always select "spdy/2" as a next protocol regardless whether or not
the server advertises it. The NPN draft allows this.
Returning integer version number is not flexible because the selected protcol
is just a string.
The function now returns 0 if the server advertised spdy/2, or -1.
2012-02-05 21:48:20 +09:00
Tatsuhiro Tsujikawa 876c33c562 Merge branch 'master' of https://github.com/sorced-jim/spdylay into sorced-jim-master
Conflicts:
	examples/spdylay_ssl.cc
	tests/Makefile.am
	tests/main.c

Changes:
        spdylay_select_next_protocol() returns -1 if it fails.
        Use cunit without pkg-config because debian does not provide .pc file.
        Some doc updates to suite my taste.
        Added spdylay_npn.h
2012-02-03 23:53:43 +09:00
Jim Morrison ea60bd8c6e Add an NPN callback helper that finds the correct version of spdy 2012-02-02 16:31:11 -08:00