Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ReadMailReallyFast
code
Commits
1986bdcf
Commit
1986bdcf
authored
2 years ago
by
Benny Baumann
Browse files
Options
Downloads
Patches
Plain Diff
chg: Implement async_server functions in header
parent
d7bc923d
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
First unit tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/net/async_server.cpp
+0
-10
0 additions, 10 deletions
src/net/async_server.cpp
src/net/async_server.hpp
+6
-2
6 additions, 2 deletions
src/net/async_server.hpp
with
6 additions
and
12 deletions
src/net/async_server.cpp
+
0
−
10
View file @
1986bdcf
...
...
@@ -53,14 +53,4 @@ void async_server_socket::cb_ev(::ev::io &w, int events) {
}
}
inline
void
async_server_socket
::
set_accept_handler
(
const
accept_handler_type
&
value
)
{
on_accept
=
value
;
}
inline
async_server_socket
::
accept_handler_type
async_server_socket
::
get_accept_handler
()
const
{
return
on_accept
;
}
}
This diff is collapsed.
Click to expand it.
src/net/async_server.hpp
+
6
−
2
View file @
1986bdcf
...
...
@@ -58,7 +58,9 @@ public:
* @brief get the current registered accept handler
* @return The current accept handler
*/
accept_handler_type
get_accept_handler
()
const
;
inline
accept_handler_type
get_accept_handler
()
const
{
return
on_accept
;
}
/**
* Use this method in order to set a new incomming socket acceptance handler.
...
...
@@ -66,7 +68,9 @@ public:
* @brief Set a new acceptance handler
* @param value The new handler to set
*/
void
set_accept_handler
(
const
accept_handler_type
&
value
);
inline
void
set_accept_handler
(
const
accept_handler_type
&
value
)
{
on_accept
=
value
;
}
private
:
void
cb_ev
(
::
ev
::
io
&
w
,
int
events
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment