Commit Graph

4998 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa f11c2a94b4 Listen both IPv4 and IPv6 sockets. 2012-02-10 02:27:56 +09:00
Tatsuhiro Tsujikawa 6d35f7e470 Added kqueue support in spdyd. 2012-02-10 02:06:46 +09:00
Tatsuhiro Tsujikawa bc8b7212b2 Added missing source files in dist 2012-02-10 01:11:13 +09:00
Tatsuhiro Tsujikawa 24aff9ac44 Abstract event polling function in EventPoll. 2012-02-10 00:45:33 +09:00
Tatsuhiro Tsujikawa ad50b75d75 Fixed compiler warning 2012-02-09 22:48:33 +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 f1c4427328 Added a check to see whether the installed cunit requires -lncurses 2012-02-09 22:11:30 +09:00
Tatsuhiro Tsujikawa 61dc691385 Merge branch 'master' of github.com:tatsuhiro-t/spdylay 2012-02-09 21:31:24 +09:00
Tatsuhiro Tsujikawa aee42d14ab Merge pull request #8 from sorced-jim/master
Minor configure updates to make things compile on OSX with openssl 1.0.0 already installed on the system
2012-02-09 04:30:59 -08:00
Jim Morrison dd5c770f32 Check for openssl >= 1.0.1. Conditionally compile spdyd based on having epoll 2012-02-08 11:08:27 -08:00
Tatsuhiro Tsujikawa 4f5c6b60ef Ignore control frame other than SYN_STREAM if version != SPDYLAY_PROTO_VERSION 2012-02-09 00:27:22 +09:00
Tatsuhiro Tsujikawa d7e58b5cab Updated doc 2012-02-08 23:51:52 +09:00
Tatsuhiro Tsujikawa 34f0f6be1b Refuse incoming SYN_STREAM with SPDYLAY_REFUSED_STREAM if max-concurrent-streams number is reached. 2012-02-08 23:45:48 +09:00
Tatsuhiro Tsujikawa fa312caa06 Check cunit and openssl in configure and set substitute variables. 2012-02-08 23:11:06 +09:00
Tatsuhiro Tsujikawa 580a2b1b1e Updated doc 2012-02-08 22:34:48 +09:00
Tatsuhiro Tsujikawa 2c5c60b752 Updated according to spdylay_select_next_protocol change 2012-02-08 21:52:44 +09:00
Tatsuhiro Tsujikawa 14ac6f8ca8 Fixed 16bit int overflow 2012-02-08 21:50:16 +09:00
Tatsuhiro Tsujikawa 656a4b6e72 Fixed compiler warning 2012-02-08 21:49:15 +09:00
Tatsuhiro Tsujikawa 887850e2f0 Use explicit name for variables to check callback function was called. 2012-02-08 21:46:29 +09:00
Tatsuhiro Tsujikawa 679159878f Merge branch 'master' of https://github.com/sorced-jim/spdylay into sorced-jim-master
Conflicts:
	tests/main.c
	tests/spdylay_session_test.c
	tests/spdylay_session_test.h
2012-02-08 21:37:44 +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
Jim Morrison 4298dc8a51 Erase the stream from the map after calling the on_stream_close callback 2012-02-07 14:17:38 -08:00
Jim Morrison 4ebfa021ba Use pkg-config to get the cunit library. 2012-02-07 14:16:55 -08:00
Tatsuhiro Tsujikawa c07f780e52 Fixed typo 2012-02-08 04:02:26 +09:00
Tatsuhiro Tsujikawa 6ac7433a5e Added -D option. Fixed segmentation fault when -d is used. Fixed memory leak. 2012-02-08 02:57:19 +09:00
Tatsuhiro Tsujikawa 0e56709a24 Updated README.rst 2012-02-08 02:13:01 +09:00
Tatsuhiro Tsujikawa fd0e91b082 Set TCP_NODELAY in spdycat 2012-02-08 01:54:44 +09:00
Tatsuhiro Tsujikawa dfce262fe5 Added non-blocking SPDY server spdyd. It only handles static contents. 2012-02-08 01:54:13 +09:00
Tatsuhiro Tsujikawa 3bfe0553d1 Call both Spdylay::recv and Spdylay::send on either POLLIN or POLLOUT 2012-02-08 01:33:55 +09:00
Tatsuhiro Tsujikawa 6904ccc023 Removed unused debug function 2012-02-08 01:28:59 +09:00
Tatsuhiro Tsujikawa 154b02c464 Set max outbound DATA frame length to 8+4KiB 2012-02-08 01:28:00 +09:00
Tatsuhiro Tsujikawa 59329b0070 Set buffer size of inbound frames to 16KiB. 2012-02-08 01:25:26 +09:00
Tatsuhiro Tsujikawa 4630dfb4fe Added spdylay_on_request_recv_callback function.
This function invoked when request from remote peer is
received.  In other words, frame with FIN flag set is received.  In
HTTP, this means HTTP request, including request body, is fully
received.
2012-02-08 00:11:44 +09:00
Tatsuhiro Tsujikawa e8a9268985 Included spdylayver.h from spdylay.h 2012-02-07 21:19:23 +09:00
Tatsuhiro Tsujikawa 7f41ec03bd Fixed the bug that port number in URI is not parsed properly. 2012-02-07 02:06:51 +09:00
Tatsuhiro Tsujikawa 5012f177d0 Fixed 2 bugs: incorrect DATA frame length and data payload is zero-cleard. 2012-02-07 02:04:00 +09:00
Tatsuhiro Tsujikawa a14b9a1ba6 Added spdylay_submit_cancel() to send RST_STREAM 2012-02-06 21:20:35 +09:00
Tatsuhiro Tsujikawa 00bed87537 Support max concurrent streams limit.
If max concurrent streams limit is reached, SYN_STREAM frames are not sent
and backed off. If other type of frame is waiting in the tx queue, it is
sent first. We introduced another priority queue for this purpose.
In this change we did not add code to send RST_STREAM when SYN_STREAM is
received but max concurrent stream is reached.
2012-02-06 00:14:19 +09:00
Tatsuhiro Tsujikawa d4c5f39cf9 Don't check multiple in-sequence NULL in spdylay_frame_count_unpack_nv_space
If we return negative error code in that function, it means frame will not
unpacked and ends up to lose any information the frame contains.
The spec says it should send RST_STREAM with PROTOCOL_ERROR, so we need
at least stream ID.
Therefore, the check should be performed in
spdylay_session_on_syn_stream_received().
2012-02-05 21:57:55 +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 be7cc9710f Added asserts to test_spdylay_frame_count_unpack_nv_space() 2012-02-04 23:27:05 +09:00
Tatsuhiro Tsujikawa 8b20e83652 Rewritten spdylay_frame_unpack_nv().
We use just single buffer to store name/value headers fields, instead of
allocating memory for each name/value strings.
It is now more than 2 times faster than old one.
2012-02-04 23:09:03 +09:00
Tatsuhiro Tsujikawa 1f72165549 Added stream_user_data arg to spdylay_submit_request() to identify stream ID later easily.
Specified stream_user_data_arg can be retrieved by
spdylay_session_get_stream_user_data() function. The application code can use
this function insde spdylay_on_ctrl_send_callback() and identify stream ID
for the request associated by the stream_user_data.
The sample usage is in examples/spdycat.cc.
2012-02-04 01:37:21 +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
Jim Morrison 046cb44a06 Ignore .DS_STORE files 2012-02-02 13:00:39 -08:00
Tatsuhiro Tsujikawa df4a1b8da4 Updated doc 2012-02-02 23:23:35 +09:00
Tatsuhiro Tsujikawa 4030c5ccf5 Closes all server-pushed streams when original stream is closed by RST_STREAM with CANCEL from client.
Fixed spdylay_session_is_my_stream_id()
2012-02-02 23:20:25 +09:00
Tatsuhiro Tsujikawa bb6a90dc4d Added spdylay_stream_add_pushed_stream
With this function and 3 new member in spdylay_stream, we can track server-
pushed streams which associate them to this stream.
2012-02-02 21:51:52 +09:00
Tatsuhiro Tsujikawa e1abe54a81 Updated spdycat output example 2012-02-02 00:45:02 +09:00