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
d44283ec
Commit
d44283ec
authored
3 years ago
by
Leon Dietrich
Committed by
Benny Baumann
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add: Document abstract connection clients
parent
ee7b3235
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
First unit tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/net/connection_client.hpp
+6
-1
6 additions, 1 deletion
src/net/connection_client.hpp
with
6 additions
and
1 deletion
src/net/connection_client.hpp
+
6
−
1
View file @
d44283ec
...
...
@@ -15,6 +15,10 @@ namespace rmrf::net {
class
connection_client
:
public
std
::
enable_shared_from_this
<
connection_client
>
{
public:
/**
* This function type accepts a reference to the incomming data string which it may not alter
* and may not return any data.
*/
typedef
std
::
function
<
void
(
const
std
::
string
&
)
>
incomming_data_cb
;
protected:
...
...
@@ -25,6 +29,7 @@ public:
/**
* Use this method to send data to the other endpoint.
* @param data The data to send
*/
virtual
void
write_data
(
const
std
::
string
&
data
)
=
0
;
...
...
@@ -33,7 +38,7 @@ public:
* called when the client got data to process.
* @param cb The callback function to register [void(std::string data)]
*/
inline
void
set_incomming_data_callback
(
const
incomming_data_cb
&
cb
)
{
inline
void
set_incomming_data_callback
(
const
incomming_data_cb
&
cb
)
{
this
->
in_data_cb
=
cb
;
};
};
...
...
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