Commit fa549aa3 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Added state and flags to spdylay_stream

parent 5ececcd8
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
void spdylay_stream_init(spdylay_stream *stream, int32_t stream_id) void spdylay_stream_init(spdylay_stream *stream, int32_t stream_id)
{ {
stream->stream_id = stream_id; stream->stream_id = stream_id;
stream->state = SPDYLAY_STREAM_OPENING;
} }
void spdylay_stream_free(spdylay_stream *stream) void spdylay_stream_free(spdylay_stream *stream)
......
...@@ -31,8 +31,17 @@ ...@@ -31,8 +31,17 @@
#include <spdylay/spdylay.h> #include <spdylay/spdylay.h>
typedef enum {
SPDYLAY_STREAM_OPENING,
SPDYLAY_STREAM_OPENED,
SPDYLAY_STREAM_CLOSING
} spdylay_stream_state;
typedef struct { typedef struct {
int32_t stream_id; int32_t stream_id;
spdylay_stream_state state;
/* Use same value in frame */
uint8_t flags;
} spdylay_stream; } spdylay_stream;
void spdylay_stream_init(spdylay_stream *stream, int32_t stream_id); void spdylay_stream_init(spdylay_stream *stream, int32_t stream_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment