OGLplus  (0.59.0) a C++ wrapper for rendering APIs

conn_factory.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_MESSAGE_BUS_CONN_FACTORY_HPP
10 #define EAGINE_MESSAGE_BUS_CONN_FACTORY_HPP
11 
12 #include "acceptor.hpp"
13 #include "connection.hpp"
14 #include <memory>
15 
16 namespace eagine::msgbus {
17 //------------------------------------------------------------------------------
21 
24  virtual auto make_acceptor(string_view address)
25  -> std::unique_ptr<acceptor> = 0;
26 
29  virtual auto make_connector(string_view address)
30  -> std::unique_ptr<connection> = 0;
31 
34  auto make_acceptor() {
35  return make_acceptor(string_view{});
36  }
37 
40  auto make_connector() {
41  return make_connector(string_view{});
42  }
43 
47  return make_acceptor(id.name());
48  }
49 
53  return make_connector(id.name());
54  }
55 };
56 //------------------------------------------------------------------------------
57 } // namespace eagine::msgbus
58 
59 #endif // EAGINE_MESSAGE_BUS_CONN_FACTORY_HPP
auto make_acceptor()
Make a new acceptor listening on a default address.
Definition: conn_factory.hpp:34
auto make_acceptor(identifier id)
Make a new acceptor listening on the specified address.
Definition: conn_factory.hpp:46
Interface for message bus connection and acceptor factories.
Definition: conn_factory.hpp:20
auto make_connector()
Make a new connector connecting to the specified address.
Definition: conn_factory.hpp:40
basic_address< false > address
Type alias for non-const memory address values.
Definition: address.hpp:203
auto make_connector(identifier id)
Make a new connector connecting to the specified address.
Definition: conn_factory.hpp:52
Message bus code is placed in this namespace.
Definition: eagine.hpp:58
Basic interface for retrieving message bus connection information.
Definition: connection.hpp:98

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).