spdylay_npn_get_proto_list() returns a pointer to the supported SPDY
version list. The element of the list is spdylay_npn_proto struct. It
contains all SPDY version information this library supports. The
application can use this information to configure NPN protocol
offerings/selection.
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).
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.
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