Skip to content

Commit

Permalink
Upgrade spdylay to efebc1e1afd1b3b4f1219e098b052c6dcd061cbf
Browse files Browse the repository at this point in the history
  • Loading branch information
pquerna committed Mar 28, 2012
1 parent e512027 commit c69176c
Show file tree
Hide file tree
Showing 35 changed files with 713 additions and 386 deletions.
18 changes: 15 additions & 3 deletions deps/spdylay/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ choose the way of handling events. This library code does not depend
on any particular SSL library (except for example programs which
depend on OpenSSL 1.0.1 or later).

The current status of development is in a beta stage now. As described
below, we can create SPDY client and server with the current Spdylay
API.
STATUS
------

SPDY/2
Most of the SPDY/2 functionality has been implemented.

SPDY/3
CREDENTIALS frame has not been implemented yet.

In both versions, the direct support of server-push has not been
available yet. The application can achieve server-push using
primitive APIs though.

As described below, we can create SPDY client and server with the
current Spdylay API.

Build from git
--------------
Expand Down
13 changes: 10 additions & 3 deletions deps/spdylay/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ dnl LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
dnl OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
dnl WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AC_PREREQ(2.61)
LT_PREREQ([2.2.6])
AC_INIT([spdylay], [0.1.0], [t-tujikawa@users.sourceforge.net])
LT_PREREQ([2.2.6])
LT_INIT()
dnl See versioning rule:
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST(LT_CURRENT, 0)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE, 0)

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE()
Expand All @@ -37,7 +42,6 @@ AC_CONFIG_HEADERS([config.h])
dnl Checks for programs
AC_PROG_CC
AC_PROG_CXX
AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
Expand Down Expand Up @@ -89,6 +93,7 @@ PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1])
# Checks for header files.
AC_CHECK_HEADERS([ \
arpa/inet.h \
netinet/in.h \
stddef.h \
stdint.h \
stdlib.h \
Expand All @@ -108,7 +113,9 @@ AC_CHECK_TYPES([ptrdiff_t])
AC_C_BIGENDIAN

# Checks for library functions.
AC_FUNC_MALLOC
if test "x$cross_compiling" != "xyes"; then
AC_FUNC_MALLOC
fi
AC_CHECK_FUNCS([ \
memmove \
memset \
Expand Down
4 changes: 2 additions & 2 deletions deps/spdylay/examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

AM_CFLAGS = -Wall
AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \
@OPENSSL_CFLAGS@
@OPENSSL_CFLAGS@ @DEFS@
AM_LDFLAGS = @OPENSSL_LIBS@
LDADD = $(top_builddir)/lib/libspdylay.la

Expand Down Expand Up @@ -56,7 +56,7 @@ spdyd_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \
spdyd.cc

if HAVE_STDCXX_11
bin_PROGRAMS += spdynative
noinst_PROGRAMS = spdynative
spdynative_CXXFLAGS = -std=c++0x
spdynative_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \
${EVENT_OBJECTS} ${EVENT_HFILES} \
Expand Down
5 changes: 3 additions & 2 deletions deps/spdylay/lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SUBDIRS = includes

AM_CFLAGS = -Wall
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes @DEFS@

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libspdylay.pc
Expand All @@ -40,7 +40,8 @@ HFILES = spdylay_pq.h spdylay_int.h spdylay_map.h spdylay_queue.h \
spdylay_buffer.h spdylay_frame.h spdylay_zlib.h \
spdylay_session.h spdylay_helper.h spdylay_stream.h spdylay_int.h \
spdylay_npn.h \
spdylay_submit.h spdylay_outbound_item.h
spdylay_submit.h spdylay_outbound_item.h \
spdylay_net.h

libspdylay_la_SOURCES = $(HFILES) $(OBJECTS)
libspdylay_la_LDFLAGS = -no-undefined \
Expand Down
90 changes: 45 additions & 45 deletions deps/spdylay/lib/includes/spdylay/spdylay.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,20 @@ struct spdylay_session;
typedef struct spdylay_session spdylay_session;

/**
* @macro
*
* SPDY protocol version 2
*/
#define SPDYLAY_PROTO_SPDY2 2
/**
* @macro
* @enum
*
* SPDY protocol version 3
* The SPDY protocol version.
*/
#define SPDYLAY_PROTO_SPDY3 3
typedef enum {
/**
* SPDY protocol version 2
*/
SPDYLAY_PROTO_SPDY2 = 2,
/**
* SPDY protocol version 3
*/
SPDYLAY_PROTO_SPDY3 = 3
} spdylay_proto_version;

/**
* @enum
Expand Down Expand Up @@ -143,6 +146,14 @@ typedef enum {
* GOAWAY has already been sent.
*/
SPDYLAY_ERR_GOAWAY_ALREADY_SENT = -517,
/**
* The received frame contains the invalid header block. (e.g.,
* There are duplicate header names; or the header names are not
* encoded in US-ASCII character set and not lower cased; or the
* header name is zero-length string; or the header value contains
* multiple in-sequence NUL bytes).
*/
SPDYLAY_ERR_INVALID_HEADER_BLOCK = -518,
/**
* The errors < :enum:`SPDYLAY_ERR_FATAL` mean that the library is
* under unexpected condition and cannot process any further data
Expand All @@ -156,7 +167,7 @@ typedef enum {
/**
* The user callback function failed. This is a fatal error.
*/
SPDYLAY_ERR_CALLBACK_FAILURE = -902,
SPDYLAY_ERR_CALLBACK_FAILURE = -902
} spdylay_error;

typedef enum {
Expand Down Expand Up @@ -207,7 +218,7 @@ typedef enum {
/**
* The DATA frame.
*/
SPDYLAY_DATA = 100,
SPDYLAY_DATA = 100
} spdylay_frame_type;

/**
Expand Down Expand Up @@ -407,17 +418,6 @@ typedef enum {
SPDYLAY_GOAWAY_INTERNAL_ERROR = 11
} spdylay_goaway_status_code;

/**
* @macro
* Lowest priority value in SPDY/2, which is 3.
*/
#define SPDYLAY_SPDY2_PRI_LOWEST 3
/**
* @macro
* Lowest priority value in SPDY/3, which is 7.
*/
#define SPDYLAY_SPDY3_PRI_LOWEST 7

/**
* @struct
* The control frame header.
Expand Down Expand Up @@ -460,10 +460,9 @@ typedef struct {
*/
int32_t assoc_stream_id;
/**
* The priority of this frame. 0 (Highest) to
* :macro:`SPDYLAY_SPDY2_PRI_LOWEST` or
* :macro:`SPDYLAY_SPDY3_PRI_LOWEST` (lowest), depending on the
* protocol version.
* The priority of this frame. 0 is the highest priority value. Use
* `spdylay_session_get_pri_lowest()` to know the lowest priority
* value.
*/
uint8_t pri;
/**
Expand Down Expand Up @@ -983,10 +982,10 @@ typedef struct {
* |callbacks|. |user_data| is an arbitrary user supplied data, which
* will be passed to the callback functions.
*
* Some of the members of |callbacks| can be ``NULL``, but
* :member:`spdylay_session_callbacks.send_callback` and
* :member:`spdylay_session_callbacks.recv_callback` must be
* specified.
* The :member:`spdylay_session_callbacks.send_callback` must be
* specified. If the application code uses `spdylay_session_recv()`,
* the :member:`spdylay_session_callbacks.recv_callback` must be
* specified. The other members of |callbacks| can be ``NULL``.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
Expand All @@ -1012,10 +1011,10 @@ int spdylay_session_client_new(spdylay_session **session_ptr,
* |callbacks|. |user_data| is an arbitrary user supplied data, which
* will be passed to the callback functions.
*
* Some of the members of |callbacks| can be ``NULL``, but
* :member:`spdylay_session_callbacks.send_callback` and
* :member:`spdylay_session_callbacks.recv_callback` must be
* specified.
* The :member:`spdylay_session_callbacks.send_callback` must be
* specified. If the application code uses `spdylay_session_recv()`,
* the :member:`spdylay_session_callbacks.recv_callback` must be
* specified. The other members of |callbacks| can be ``NULL``.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
Expand Down Expand Up @@ -1232,18 +1231,22 @@ void* spdylay_session_get_stream_user_data(spdylay_session *session,
*/
size_t spdylay_session_get_outbound_queue_size(spdylay_session *session);

/**
* @function
*
* Returns lowest priority value for the |session|.
*/
uint8_t spdylay_session_get_pri_lowest(spdylay_session *session);

/**
* @function
*
* Submits SYN_STREAM frame and optionally one or more DATA
* frames.
*
* The |pri| is priority of this request. 0 is the highest priority
* value. If the |session| is initialized with the version
* :macro:`SPDYLAY_PROTO_SPDY2`, the lowest priority value is
* :macro:`SPDYLAY_SPDY2_PRI_LOWEST`. If the |session| is initialized
* with the version :macro:`SPDYLAY_PROTO_SPDY3`, the lowest priority
* value is :macro:`SPDYLAY_SPDY3_PRI_LOWEST`.
* value. Use `spdylay_session_get_pri_lowest()` to know the lowest
* priority value for this |session|.
*
* The |nv| contains the name/value pairs. For i > 0, ``nv[2*i]``
* contains a pointer to the name string and ``nv[2*i+1]`` contains a
Expand Down Expand Up @@ -1364,13 +1367,10 @@ int spdylay_submit_response(spdylay_session *session,
*
* The |assoc_stream_id| is used for server-push. If |session| is
* initialized for client use, |assoc_stream_id| is ignored.
*
* The |pri| is priority of this request. 0 is the highest priority
* value. If the |session| is initialized with the version
* :macro:`SPDYLAY_PROTO_SPDY2`, the lowest priority value is
* :macro:`SPDYLAY_SPDY2_PRI_LOWEST`. If the |session| is initialized
* with the version :macro:`SPDYLAY_PROTO_SPDY3`, the lowest priority
* value is :macro:`SPDYLAY_SPDY3_PRI_LOWEST`.
* value. Use `spdylay_session_get_pri_lowest()` to know the lowest
* priority value for this |session|.
*
* The |nv| contains the name/value pairs. For i > 0, ``nv[2*i]``
* contains a pointer to the name string and ``nv[2*i+1]`` contains a
Expand Down
Loading

0 comments on commit c69176c

Please sign in to comment.