SOLA
Loading...
Searching...
No Matches
network_facade.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_NETWORK_FACADE_H_
8#define MINHTON_NETWORK_FACADE_H_
9
10#include "minhton/message/message.h"
11#include "minhton/message/types_all.h"
12#include "minhton/utils/serializer_cereal.h"
13#include "solanet/network_udp/network_udp.h"
14
15namespace minhton {
20public:
21 NetworkFacade(std::function<void(const MessageVariant &msg)> recv_fct, const std::string &ip);
22 void send(const MessageVariant &msg);
23
24 std::string getIP() const;
25 uint16_t getPort() const;
26
27private:
28 void processMessage(const solanet::Message &msg);
29
31
32 solanet::Network network_;
33 std::function<void(const MessageVariant &msg)> recv_fct_;
34};
35} // namespace minhton
36
37#endif // NATTER_CORE_NETWORK_FACADE_H_
Definition network_facade.h:19
Definition serializer_cereal.h:23
Definition message.h:14
Definition network_udp.h:18
Definition minhton_watchdog_ns3.cpp:24