Commit Graph

163 Commits

Author SHA1 Message Date
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
Tatsuhiro Tsujikawa db498a7601 Prettify verbose output 2012-02-02 00:37:48 +09:00
Tatsuhiro Tsujikawa 562278194c Added server push SYN_STREAM validation. Added spdylay_session_server_new()
We still does not check "url" is in nv.
2012-02-02 00:19:31 +09:00
Tatsuhiro Tsujikawa 45376c6b11 spdycat: Added host header field to SYN_STREAM. 2012-02-01 21:47:25 +09:00
Tatsuhiro Tsujikawa 42f8ef5f99 Added libcrypto to pkg-config args 2012-02-01 21:42:29 +09:00
Tatsuhiro Tsujikawa e97fcd7442 Do some fancy markups 2012-02-01 21:34:24 +09:00
Tatsuhiro Tsujikawa 175c4758bf Merge pull request #4 from sorced-jim/master
Minor updates to make git status work better
2012-02-01 04:29:33 -08:00
Jim Morrison 40db6885b7 Automake-zie the examples directory 2012-01-31 11:10:09 -08:00
Jim Morrison a0c457cc6a Ignore built libraries 2012-01-31 10:11:03 -08:00
Jim Morrison cd799479fa Document mostly obvious build steps 2012-01-31 10:09:42 -08:00
Jim Morrison 8d75fe7c92 Add ignoreable files 2012-01-31 10:07:35 -08:00
Tatsuhiro Tsujikawa 18175bbfae Fixed link bug in README.rst 2012-02-01 02:40:14 +09:00
Tatsuhiro Tsujikawa c15b86a55a Updated doc 2012-02-01 02:39:04 +09:00
Tatsuhiro Tsujikawa 78cd59d1d0 Gather prerequisites of spdycat into $(SPDYCAT_OBJS) 2012-02-01 02:19:40 +09:00
Tatsuhiro Tsujikawa 0236d0d2df Print details for SETTINGS, RST_STREAM, HEADERS. 2012-02-01 01:16:35 +09:00
Tatsuhiro Tsujikawa 24eb3a3b36 SETTINGS ID is little endian in wire format despite the fact that spec/2 says it is network byte order. 2012-02-01 01:13:17 +09:00
Tatsuhiro Tsujikawa f429cc45cb Added SETTINGS send/recv. Added missing RST_STREAM send. 2012-02-01 01:12:26 +09:00
Tatsuhiro Tsujikawa 0b75800c23 Added SETTINGS frame and its pack/unpack functions. 2012-02-01 00:26:26 +09:00
Tatsuhiro Tsujikawa 49096387c3 Added seq sort key in ob_pq to preserve the queueing order if priorit is the same. 2012-01-31 22:48:09 +09:00
Tatsuhiro Tsujikawa 4e192493ab Use gettimeofday instead of clock_gettime and use poll instead of epoll for portability. 2012-01-31 22:04:51 +09:00
Tatsuhiro Tsujikawa 9785b99959 Suppress warnings in test code 2012-01-31 21:38:40 +09:00
Tatsuhiro Tsujikawa afbade9e79 Fixed test error 2012-01-31 21:34:42 +09:00
Tatsuhiro Tsujikawa b87eb8987e Fixed compile error with gcc-4.4 2012-01-31 21:32:46 +09:00
Tatsuhiro Tsujikawa 1139502675 Removed on_ping_recv_callback. Removed last_ping_time from spdylay_session. 2012-01-31 21:29:46 +09:00
Tatsuhiro Tsujikawa e0526aac9a Merge pull request #3 from sorced-jim/master
Include sys/types.h for ssize_t
2012-01-31 04:22:22 -08:00
Jim Morrison 732f1cf21f Include sys/types.h 2012-01-30 17:11:14 -08:00
Tatsuhiro Tsujikawa 826cd6a5e7 Updated doc 2012-01-31 00:51:06 +09:00
Tatsuhiro Tsujikawa d3a3dc5943 Added proper command-line option support using getopt_long.
Now -nvh option works.
2012-01-31 00:46:46 +09:00
Tatsuhiro Tsujikawa 856d230595 The response DATA frame is now queued after SYN_STREAM/SYN_REPLY has been sent.
This is because our priority queue implementation does not have stable sort
property, so queueing SYN_STREAM, DATA in this order does not necessarily
mean SYN_STREAM will be sent first.
2012-01-30 23:55:00 +09:00
Tatsuhiro Tsujikawa e5dc14e20c Use CLOCK_MONOTONIC_RAW 2012-01-30 22:52:56 +09:00
Tatsuhiro Tsujikawa e6506b4206 Updated README 2012-01-30 00:39:32 +09:00
Tatsuhiro Tsujikawa 641443f6c5 Added Makefile for examples 2012-01-30 00:35:33 +09:00
Tatsuhiro Tsujikawa 0b57f01009 Rewritten spdycl as spdycat. 2012-01-30 00:34:10 +09:00
Tatsuhiro Tsujikawa 6e12291ae1 Added spdylay_on_stream_close_callback 2012-01-29 23:00:33 +09:00
Tatsuhiro Tsujikawa bf1be4850e spdylay_submit_request: Fixed segmentation fault if data_prd is NULL 2012-01-29 19:15:59 +09:00
Tatsuhiro Tsujikawa 3d4cf8aec3 Added data_prd arugment to spdylay_submit_request() and supported POST request. 2012-01-29 19:07:31 +09:00