Print details for SETTINGS, RST_STREAM, HEADERS.

This commit is contained in:
Tatsuhiro Tsujikawa 2012-02-01 01:16:35 +09:00
parent 24eb3a3b36
commit 0236d0d2df
1 changed files with 22 additions and 0 deletions

View File

@ -248,12 +248,34 @@ void print_frame(spdylay_frame_type type, spdylay_frame *frame)
frame->syn_reply.hd.length); frame->syn_reply.hd.length);
print_nv(frame->syn_reply.nv); print_nv(frame->syn_reply.nv);
break; break;
case SPDYLAY_RST_STREAM:
printf("(stream_id=%d, status_code=%u, flags=%u, length=%d)\n",
frame->rst_stream.stream_id, frame->rst_stream.status_code,
frame->rst_stream.hd.flags,
frame->rst_stream.hd.length);
break;
case SPDYLAY_SETTINGS:
printf("(flags=%u, length=%d, niv=%lu)\n",
frame->settings.hd.flags, frame->settings.hd.length,
static_cast<unsigned long>(frame->settings.niv));
for(size_t i = 0; i < frame->settings.niv; ++i) {
printf(" [%d(%u):%u]\n",
frame->settings.iv[i].settings_id,
frame->settings.iv[i].flags, frame->settings.iv[i].value);
}
break;
case SPDYLAY_PING: case SPDYLAY_PING:
printf("(unique_id=%d)\n", frame->ping.unique_id); printf("(unique_id=%d)\n", frame->ping.unique_id);
break; break;
case SPDYLAY_GOAWAY: case SPDYLAY_GOAWAY:
printf("(last_good_stream_id=%d)\n", frame->goaway.last_good_stream_id); printf("(last_good_stream_id=%d)\n", frame->goaway.last_good_stream_id);
break; break;
case SPDYLAY_HEADERS:
printf("(stream_id=%d, flags=%u, length=%d)\n",
frame->headers.stream_id, frame->headers.hd.flags,
frame->headers.hd.length);
print_nv(frame->headers.nv);
break;
default: default:
printf("\n"); printf("\n");
break; break;