Scripting: reimplement protocol over plan UDP using boost::asio

This commit is contained in:
Weiyi Wang
2019-01-29 17:28:50 -05:00
parent bad2e084e3
commit d765a73a53
9 changed files with 152 additions and 134 deletions

View File

@@ -4,24 +4,25 @@
#pragma once
#include "core/rpc/packet.h"
#include "core/rpc/zmq_server.h"
#include <memory>
namespace RPC {
class RPCServer;
class ZMQServer;
class UDPServer;
class Packet;
class Server {
public:
Server(RPCServer& rpc_server);
~Server();
void Start();
void Stop();
void NewRequestCallback(std::unique_ptr<RPC::Packet> new_request);
void NewRequestCallback(std::unique_ptr<Packet> new_request);
private:
RPCServer& rpc_server;
std::unique_ptr<ZMQServer> zmq_server;
std::unique_ptr<UDPServer> udp_server;
};
} // namespace RPC