Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
c3283e1c
Commit
c3283e1c
authored
Sep 23, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tutorial
parent
25e2adbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
doc/sources/tutorial-client.rst
doc/sources/tutorial-client.rst
+2
-2
doc/sources/tutorial-server.rst
doc/sources/tutorial-server.rst
+3
-3
No files found.
doc/sources/tutorial-client.rst
View file @
c3283e1c
...
...
@@ -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
...
...
doc/sources/tutorial-server.rst
View file @
c3283e1c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment