Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
f451efa1
Commit
f451efa1
authored
May 18, 2015
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up code, remove warnings
parent
f53746ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
libcaf_io/caf/io/network/asio_multiplexer.hpp
libcaf_io/caf/io/network/asio_multiplexer.hpp
+2
-16
libcaf_io/src/asio_multiplexer.cpp
libcaf_io/src/asio_multiplexer.cpp
+16
-0
No files found.
libcaf_io/caf/io/network/asio_multiplexer.hpp
View file @
f451efa1
...
@@ -21,7 +21,9 @@
...
@@ -21,7 +21,9 @@
#ifndef CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
#ifndef CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
#define CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
#define CAF_IO_NETWORK_ASIO_MULTIPLEXER_HPP
CAF_PUSH_WARNINGS
#include "boost/asio.hpp"
#include "boost/asio.hpp"
CAF_POP_WARNINGS
#include "caf/detail/logging.hpp"
#include "caf/detail/logging.hpp"
...
@@ -55,22 +57,6 @@ using default_socket_acceptor = boost::asio::ip::tcp::acceptor;
...
@@ -55,22 +57,6 @@ using default_socket_acceptor = boost::asio::ip::tcp::acceptor;
*/
*/
using
native_socket
=
typename
default_socket
::
native_handle_type
;
using
native_socket
=
typename
default_socket
::
native_handle_type
;
/**
* Platform-specific native acceptor socket type.
*/
using
native_socket_acceptor
=
typename
default_socket_acceptor
::
native_handle_type
;
/**
* A wrapper for the supervisor backend provided by boost::asio.
*/
struct
asio_supervisor
:
public
multiplexer
::
supervisor
{
asio_supervisor
(
io_backend
&
iob
)
:
work
(
iob
)
{}
private:
boost
::
asio
::
io_service
::
work
work
;
};
/**
/**
* A wrapper for the boost::asio multiplexer
* A wrapper for the boost::asio multiplexer
*/
*/
...
...
libcaf_io/src/asio_multiplexer.cpp
View file @
f451efa1
...
@@ -29,6 +29,22 @@ namespace caf {
...
@@ -29,6 +29,22 @@ namespace caf {
namespace
io
{
namespace
io
{
namespace
network
{
namespace
network
{
namespace
{
/**
* A wrapper for the supervisor backend provided by boost::asio.
*/
struct
asio_supervisor
:
public
multiplexer
::
supervisor
{
asio_supervisor
(
io_backend
&
iob
)
:
work
(
iob
)
{
// nop
}
private:
boost
::
asio
::
io_service
::
work
work
;
};
}
// namespace anonymous
default_socket
new_tcp_connection
(
io_backend
&
backend
,
const
std
::
string
&
host
,
default_socket
new_tcp_connection
(
io_backend
&
backend
,
const
std
::
string
&
host
,
uint16_t
port
)
{
uint16_t
port
)
{
default_socket
fd
{
backend
};
default_socket
fd
{
backend
};
...
...
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