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
a9b74261
Commit
a9b74261
authored
Sep 19, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpd: Rewrite using bufferevent (again) for simplicity
parent
89c3c085
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
278 deletions
+85
-278
src/HttpServer.cc
src/HttpServer.cc
+81
-264
src/HttpServer.h
src/HttpServer.h
+4
-14
No files found.
src/HttpServer.cc
View file @
a9b74261
This diff is collapsed.
Click to expand it.
src/HttpServer.h
View file @
a9b74261
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <openssl/ssl.h>
#include <openssl/ssl.h>
#include <event2/event.h>
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <nghttp2/nghttp2.h>
#include <nghttp2/nghttp2.h>
...
@@ -104,12 +105,11 @@ public:
...
@@ -104,12 +105,11 @@ public:
void
remove_self
();
void
remove_self
();
int
setup_bev
();
int
setup_bev
();
int
send
();
int
on_read
();
int
on_read
();
int
on_write
();
int
on_write
();
int
on_connect
();
int
on_connect
();
int
verify_npn_result
();
int
verify_npn_result
();
int
sendcb
(
const
uint8_t
*
data
,
size_t
len
);
int
recvcb
(
uint8_t
*
buf
,
size_t
len
);
int
submit_file_response
(
const
std
::
string
&
status
,
int
submit_file_response
(
const
std
::
string
&
status
,
Stream
*
stream
,
Stream
*
stream
,
...
@@ -141,25 +141,15 @@ public:
...
@@ -141,25 +141,15 @@ public:
const
Config
*
get_config
()
const
;
const
Config
*
get_config
()
const
;
void
remove_settings_timer
();
void
remove_settings_timer
();
void
terminate_session
(
uint32_t
error_code
);
void
terminate_session
(
uint32_t
error_code
);
int
tls_handshake
();
private:
private:
int
handle_ssl_temporal_error
(
int
err
);
int
tls_write
(
const
uint8_t
*
data
,
size_t
datalen
);
int
tls_write_pending
();
int
wait_events
();
std
::
map
<
int32_t
,
std
::
unique_ptr
<
Stream
>>
id2stream_
;
std
::
map
<
int32_t
,
std
::
unique_ptr
<
Stream
>>
id2stream_
;
nghttp2_buf
sendbuf_
;
int64_t
session_id_
;
int64_t
session_id_
;
nghttp2_session
*
session_
;
nghttp2_session
*
session_
;
Sessions
*
sessions_
;
Sessions
*
sessions_
;
SSL
*
ssl_
;
SSL
*
ssl_
;
event
*
rev_
,
*
w
ev_
;
bufferevent
*
b
ev_
;
event
*
settings_timerev_
;
event
*
settings_timerev_
;
const
uint8_t
*
pending_data_
;
size_t
pending_datalen_
;
int
fd_
;
int
fd_
;
uint8_t
sendbufarray_
[
65536
];
};
};
class
HttpServer
{
class
HttpServer
{
...
...
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