Commit c3283e1c authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update tutorial

parent 25e2adbf
......@@ -269,7 +269,7 @@ data is available to read from the bufferevent input buffer::
delete_http2_session_data(session_data);
return;
}
if (evbuffer_drain(input, readlen) != 0) {
if (evbuffer_drain(input, (size_t)readlen) != 0) {
warnx("Fatal error: evbuffer_drain failed");
delete_http2_session_data(session_data);
return;
......@@ -309,7 +309,7 @@ defined as::
http2_session_data *session_data = (http2_session_data *)user_data;
struct bufferevent *bev = session_data->bev;
bufferevent_write(bev, data, length);
return length;
return (ssize_t)length;
}
Since we use bufferevent to abstract network I/O, we just write the
......
......@@ -132,7 +132,7 @@ libevent's ``struct evconnlistener`` is used for this purpose::
struct evconnlistener *listener;
listener = evconnlistener_new_bind(
evbase, acceptcb, app_ctx, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE,
16, rp->ai_addr, rp->ai_addrlen);
16, rp->ai_addr, (int)rp->ai_addrlen);
if (listener) {
freeaddrinfo(res);
......@@ -272,7 +272,7 @@ this pending data. To process the received data, we call the
warnx("Fatal error: %s", nghttp2_strerror((int)readlen));
return -1;
}
if (evbuffer_drain(input, readlen) != 0) {
if (evbuffer_drain(input, (size_t)readlen) != 0) {
warnx("Fatal error: evbuffer_drain failed");
return -1;
}
......@@ -316,7 +316,7 @@ follows::
return NGHTTP2_ERR_WOULDBLOCK;
}
bufferevent_write(bev, data, length);
return length;
return (ssize_t)length;
}
Since we use bufferevent to abstract network I/O, we just write the
......
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