Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
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
pistache
Commits
03a65a8b
Unverified
Commit
03a65a8b
authored
Jun 24, 2020
by
Igor [hyperxor]
Committed by
GitHub
Jun 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small improvements in Listener constructor (#785)
* Small improvements in Listener constructor * Trigger CI
parent
88df7c35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
include/pistache/listener.h
include/pistache/listener.h
+4
-4
src/server/listener.cc
src/server/listener.cc
+1
-9
No files found.
include/pistache/listener.h
View file @
03a65a8b
...
...
@@ -45,7 +45,7 @@ public:
TimePoint
tick
;
};
Listener
();
Listener
()
=
default
;
~
Listener
();
explicit
Listener
(
const
Address
&
address
);
...
...
@@ -81,15 +81,15 @@ public:
private:
Address
addr_
;
int
listen_fd
;
int
backlog_
;
int
listen_fd
=
-
1
;
int
backlog_
=
Const
::
MaxBacklog
;
NotifyFd
shutdownFd
;
Polling
::
Epoll
poller
;
Flags
<
Options
>
options_
;
std
::
thread
acceptThread
;
size_t
workers_
;
size_t
workers_
=
Const
::
DefaultWorkers
;
std
::
string
workersName_
;
std
::
shared_ptr
<
Handler
>
handler_
;
...
...
src/server/listener.cc
View file @
03a65a8b
...
...
@@ -148,15 +148,7 @@ void setSocketOptions(Fd fd, Flags<Options> options) {
}
}
Listener
::
Listener
()
:
addr_
(),
listen_fd
(
-
1
),
backlog_
(
Const
::
MaxBacklog
),
shutdownFd
(),
poller
(),
options_
(),
workers_
(
Const
::
DefaultWorkers
),
workersName_
(),
reactor_
(),
transportKey
()
{}
Listener
::
Listener
(
const
Address
&
address
)
:
addr_
(
address
),
listen_fd
(
-
1
),
backlog_
(
Const
::
MaxBacklog
),
shutdownFd
(),
poller
(),
options_
(),
workers_
(
Const
::
DefaultWorkers
),
workersName_
(),
reactor_
(),
transportKey
()
{}
Listener
::
Listener
(
const
Address
&
address
)
:
addr_
(
address
)
{}
Listener
::~
Listener
()
{
if
(
isBound
())
...
...
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