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
36aae8c3
Commit
36aae8c3
authored
Mar 06, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asio: Move server::http2 to its own file
parent
34ac9044
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
20 deletions
+64
-20
src/Makefile.am
src/Makefile.am
+1
-0
src/asio_server_http2.cc
src/asio_server_http2.cc
+63
-0
src/asio_server_http2_impl.cc
src/asio_server_http2_impl.cc
+0
-20
No files found.
src/Makefile.am
View file @
36aae8c3
...
@@ -177,6 +177,7 @@ libnghttp2_asio_la_SOURCES = \
...
@@ -177,6 +177,7 @@ libnghttp2_asio_la_SOURCES = \
ssl.cc ssl.h
\
ssl.cc ssl.h
\
asio_common.cc asio_common.h
\
asio_common.cc asio_common.h
\
asio_io_service_pool.cc asio_io_service_pool.h
\
asio_io_service_pool.cc asio_io_service_pool.h
\
asio_server_http2.cc
\
asio_server_http2_impl.cc asio_server_http2_impl.h
\
asio_server_http2_impl.cc asio_server_http2_impl.h
\
asio_server.cc asio_server.h
\
asio_server.cc asio_server.h
\
asio_server_http2_handler.cc asio_server_http2_handler.h
\
asio_server_http2_handler.cc asio_server_http2_handler.h
\
...
...
src/asio_server_http2.cc
0 → 100644
View file @
36aae8c3
/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2014 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nghttp2_config.h"
#include <nghttp2/asio_http2_server.h>
#include "asio_server_http2_impl.h"
#include "asio_server.h"
#include "template.h"
namespace
nghttp2
{
namespace
asio_http2
{
namespace
server
{
http2
::
http2
()
:
impl_
(
make_unique
<
http2_impl
>
())
{}
http2
::~
http2
()
{}
void
http2
::
listen_and_serve
(
const
std
::
string
&
address
,
uint16_t
port
)
{
impl_
->
listen_and_serve
(
address
,
port
);
}
void
http2
::
num_threads
(
size_t
num_threads
)
{
impl_
->
num_threads
(
num_threads
);
}
void
http2
::
tls
(
std
::
string
private_key_file
,
std
::
string
certificate_file
)
{
impl_
->
tls
(
std
::
move
(
private_key_file
),
std
::
move
(
certificate_file
));
}
void
http2
::
backlog
(
int
backlog
)
{
impl_
->
backlog
(
backlog
);
}
bool
http2
::
handle
(
std
::
string
pattern
,
request_cb
cb
)
{
return
impl_
->
handle
(
std
::
move
(
pattern
),
std
::
move
(
cb
));
}
}
// namespace server
}
// namespace asio_http2
}
// namespace nghttp2
src/asio_server_http2_impl.cc
View file @
36aae8c3
...
@@ -37,26 +37,6 @@ namespace asio_http2 {
...
@@ -37,26 +37,6 @@ namespace asio_http2 {
namespace
server
{
namespace
server
{
http2
::
http2
()
:
impl_
(
make_unique
<
http2_impl
>
())
{}
http2
::~
http2
()
{}
void
http2
::
listen_and_serve
(
const
std
::
string
&
address
,
uint16_t
port
)
{
impl_
->
listen_and_serve
(
address
,
port
);
}
void
http2
::
num_threads
(
size_t
num_threads
)
{
impl_
->
num_threads
(
num_threads
);
}
void
http2
::
tls
(
std
::
string
private_key_file
,
std
::
string
certificate_file
)
{
impl_
->
tls
(
std
::
move
(
private_key_file
),
std
::
move
(
certificate_file
));
}
void
http2
::
backlog
(
int
backlog
)
{
impl_
->
backlog
(
backlog
);
}
bool
http2
::
handle
(
std
::
string
pattern
,
request_cb
cb
)
{
return
impl_
->
handle
(
std
::
move
(
pattern
),
std
::
move
(
cb
));
}
http2_impl
::
http2_impl
()
:
num_threads_
(
1
),
backlog_
(
-
1
)
{}
http2_impl
::
http2_impl
()
:
num_threads_
(
1
),
backlog_
(
-
1
)
{}
namespace
{
namespace
{
...
...
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