Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
cpp-libs
actor-incubator
Commits
d0a0d62a
Commit
d0a0d62a
authored
Jun 03, 2020
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move basp_application_factory to own file
parent
9afbce9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
27 deletions
+52
-27
libcaf_net/caf/net/backend/tcp.hpp
libcaf_net/caf/net/backend/tcp.hpp
+0
-19
libcaf_net/caf/net/basp/application_factory.hpp
libcaf_net/caf/net/basp/application_factory.hpp
+48
-0
libcaf_net/src/net/backend/tcp.cpp
libcaf_net/src/net/backend/tcp.cpp
+4
-8
No files found.
libcaf_net/caf/net/backend/tcp.hpp
View file @
d0a0d62a
...
...
@@ -90,25 +90,6 @@ public:
}
private:
class
basp_application_factory
{
public:
using
application_type
=
basp
::
application
;
basp_application_factory
(
proxy_registry
&
proxies
);
template
<
class
Parent
>
error
init
(
Parent
&
)
{
return
none
;
}
application_type
make
()
const
{
return
application_type
{
proxies_
};
}
private:
proxy_registry
&
proxies_
;
};
endpoint_manager_ptr
get_peer
(
const
node_id
&
id
);
middleman
&
mm_
;
...
...
libcaf_net/caf/net/basp/application_factory.hpp
0 → 100644
View file @
d0a0d62a
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2019 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
#include "caf/error.hpp"
#include "caf/net/basp/application.hpp"
#include "caf/proxy_registry.hpp"
namespace
caf
::
net
::
basp
{
class
CAF_NET_EXPORT
application_factory
{
public:
using
application_type
=
basp
::
application
;
application_factory
(
proxy_registry
&
proxies
)
:
proxies_
(
proxies
)
{
// nop
}
template
<
class
Parent
>
error
init
(
Parent
&
)
{
return
none
;
}
application_type
make
()
const
{
return
application_type
{
proxies_
};
}
private:
proxy_registry
&
proxies_
;
};
}
// namespace caf::net::basp
libcaf_net/src/net/backend/tcp.cpp
View file @
d0a0d62a
...
...
@@ -22,6 +22,7 @@
#include "caf/net/actor_proxy_impl.hpp"
#include "caf/net/basp/application.hpp"
#include "caf/net/basp/application_factory.hpp"
#include "caf/net/basp/ec.hpp"
#include "caf/net/doorman.hpp"
#include "caf/net/ip.hpp"
...
...
@@ -65,9 +66,9 @@ error tcp::init() {
if
(
!
doorman_uri
)
return
doorman_uri
.
error
();
auto
&
mpx
=
mm_
.
mpx
();
auto
mgr
=
make_endpoint_manager
(
mpx
,
mm_
.
system
(),
doorman
{
acc_guard
.
release
(),
basp_
application_factory
{
proxies_
}});
auto
mgr
=
make_endpoint_manager
(
mpx
,
mm_
.
system
(),
doorman
{
acc_guard
.
release
(),
basp
::
application_factory
{
proxies_
}});
if
(
auto
err
=
mgr
->
init
())
{
CAF_LOG_ERROR
(
"mgr->init() failed: "
<<
err
);
return
err
;
...
...
@@ -138,9 +139,4 @@ endpoint_manager_ptr tcp::get_peer(const node_id& id) {
return
nullptr
;
}
tcp
::
basp_application_factory
::
basp_application_factory
(
proxy_registry
&
proxies
)
:
proxies_
(
proxies
)
{
// nop
}
}
// namespace caf::net::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