Skip to content

File network_backend.hpp

File List > illixr > network > network_backend.hpp

Go to the documentation of this file

#pragma once

#include "illixr/phonebook.hpp"
#include "topic_config.hpp"

#include 
#include 

namespace ILLIXR::network {
class network_backend : public phonebook::service {
public:
    virtual void topic_create(std::string topic_name, topic_config& config) = 0;

    virtual bool is_topic_networked(std::string topic_name) = 0;

    virtual void topic_send(std::string topic_name, std::string&& message) = 0;

#ifndef __ANDROID__
    virtual void start_client() = 0;

    virtual void start_server() = 0;
#endif
    [[nodiscard]] virtual network::topic_config::TransportMethod transport_method() const = 0;
};

struct tcp_backend : public network_backend { };

struct udp_backend : public network_backend { };

} // namespace ILLIXR::network