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
72470e9b
Commit
72470e9b
authored
Oct 05, 2018
by
knowledge4igor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change return value in Listener::bind method to void: using bool is obsolete
parent
09cd379b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
include/pistache/endpoint.h
include/pistache/endpoint.h
+2
-3
include/pistache/listener.h
include/pistache/listener.h
+2
-2
src/server/listener.cc
src/server/listener.cc
+3
-5
No files found.
include/pistache/endpoint.h
View file @
72470e9b
...
...
@@ -67,10 +67,9 @@ private:
throw
std
::
runtime_error
(
"Must call setHandler() prior to serve()"
);
listener
.
setHandler
(
handler_
);
listener
.
bind
();
if
(
listener
.
bind
())
{
CALL_MEMBER_FN
(
listener
,
method
)();
}
CALL_MEMBER_FN
(
listener
,
method
)();
#undef CALL_MEMBER_FN
}
...
...
include/pistache/listener.h
View file @
72470e9b
...
...
@@ -49,8 +49,8 @@ public:
int
backlog
=
Const
::
MaxBacklog
);
void
setHandler
(
const
std
::
shared_ptr
<
Handler
>&
handler
);
bool
bind
();
bool
bind
(
const
Address
&
adress
);
void
bind
();
void
bind
(
const
Address
&
adress
);
bool
isBound
()
const
;
...
...
src/server/listener.cc
View file @
72470e9b
...
...
@@ -150,12 +150,12 @@ Listener::pinWorker(size_t worker, const CpuSet& set)
#endif
}
bool
void
Listener
::
bind
()
{
return
bind
(
addr_
);
bind
(
addr_
);
}
bool
void
Listener
::
bind
(
const
Address
&
address
)
{
if
(
!
handler_
)
throw
std
::
runtime_error
(
"Call setHandler before calling bind()"
);
...
...
@@ -205,8 +205,6 @@ Listener::bind(const Address& address) {
reactor_
.
init
(
Aio
::
AsyncContext
(
workers_
));
transportKey
=
reactor_
.
addHandler
(
transport_
);
return
true
;
}
bool
...
...
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