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
eb679253
Commit
eb679253
authored
Nov 23, 2018
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'puscas-port_in_use'
parents
c98362ea
6800d317
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
0 deletions
+20
-0
src/asio_server.cc
src/asio_server.cc
+9
-0
src/asio_server.h
src/asio_server.h
+3
-0
src/asio_server_http2.cc
src/asio_server_http2.cc
+2
-0
src/asio_server_http2_impl.cc
src/asio_server_http2_impl.cc
+2
-0
src/asio_server_http2_impl.h
src/asio_server_http2_impl.h
+1
-0
src/includes/nghttp2/asio_http2_server.h
src/includes/nghttp2/asio_http2_server.h
+3
-0
No files found.
src/asio_server.cc
View file @
eb679253
...
...
@@ -200,6 +200,15 @@ server::io_services() const {
return
io_service_pool_
.
io_services
();
}
const
std
::
vector
<
int
>
server
::
ports
()
const
{
auto
ports
=
std
::
vector
<
int
>
(
acceptors_
.
size
());
auto
index
=
0
;
for
(
const
auto
&
acceptor
:
acceptors_
)
{
ports
[
index
++
]
=
acceptor
.
local_endpoint
().
port
();
}
return
ports
;
}
}
// namespace server
}
// namespace asio_http2
}
// namespace nghttp2
src/asio_server.h
View file @
eb679253
...
...
@@ -79,6 +79,9 @@ public:
const
std
::
vector
<
std
::
shared_ptr
<
boost
::
asio
::
io_service
>>
&
io_services
()
const
;
/// Returns a vector with all the acceptors ports in use.
const
std
::
vector
<
int
>
ports
()
const
;
private:
/// Initiate an asynchronous accept operation.
void
start_accept
(
tcp
::
acceptor
&
acceptor
,
serve_mux
&
mux
);
...
...
src/asio_server_http2.cc
View file @
eb679253
...
...
@@ -90,6 +90,8 @@ http2::io_services() const {
return
impl_
->
io_services
();
}
std
::
vector
<
int
>
http2
::
ports
()
const
{
return
impl_
->
ports
();
}
}
// namespace server
}
// namespace asio_http2
...
...
src/asio_server_http2_impl.cc
View file @
eb679253
...
...
@@ -78,6 +78,8 @@ http2_impl::io_services() const {
return
server_
->
io_services
();
}
std
::
vector
<
int
>
http2_impl
::
ports
()
const
{
return
server_
->
ports
();
}
}
// namespace server
}
// namespace asio_http2
...
...
src/asio_server_http2_impl.h
View file @
eb679253
...
...
@@ -54,6 +54,7 @@ public:
void
join
();
const
std
::
vector
<
std
::
shared_ptr
<
boost
::
asio
::
io_service
>>
&
io_services
()
const
;
std
::
vector
<
int
>
ports
()
const
;
private:
std
::
unique_ptr
<
server
>
server_
;
...
...
src/includes/nghttp2/asio_http2_server.h
View file @
eb679253
...
...
@@ -214,6 +214,9 @@ public:
const
std
::
vector
<
std
::
shared_ptr
<
boost
::
asio
::
io_service
>>
&
io_services
()
const
;
// Returns a vector with the ports in use
std
::
vector
<
int
>
ports
()
const
;
private:
std
::
unique_ptr
<
http2_impl
>
impl_
;
};
...
...
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