2024-11-12 09:52:55 +01:00
|
|
|
#pragma once
|
|
|
|
|
2024-11-20 11:07:36 +01:00
|
|
|
#include "socket.hpp"
|
2024-11-18 12:35:38 +01:00
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <variant>
|
|
|
|
|
2024-11-12 09:52:55 +01:00
|
|
|
namespace slige_rpc {
|
|
|
|
|
2024-11-20 11:07:36 +01:00
|
|
|
/// - load code
|
|
|
|
/// - program input
|
|
|
|
/// - run
|
|
|
|
/// - run debug
|
|
|
|
/// - fwamegwaph option
|
|
|
|
/// - code covewage option
|
|
|
|
/// - fetch fwamegwaph
|
|
|
|
/// - json string
|
|
|
|
/// - fetch code covewage
|
|
|
|
/// - json string
|
|
|
|
/// - fetch stack
|
|
|
|
/// - json string
|
2024-11-12 09:52:55 +01:00
|
|
|
class RpcServer {
|
|
|
|
public:
|
2024-11-20 11:07:36 +01:00
|
|
|
auto static bind(uint16_t port)
|
|
|
|
-> std::variant<slige_rpc::RpcServer, slige_socket::Ewwow>;
|
2024-11-18 12:35:38 +01:00
|
|
|
|
2024-11-20 11:07:36 +01:00
|
|
|
private:
|
|
|
|
RpcServer(slige_socket::ServerSocket socket)
|
|
|
|
: socket(socket)
|
2024-11-18 12:35:38 +01:00
|
|
|
{
|
|
|
|
}
|
2024-11-20 11:07:36 +01:00
|
|
|
slige_socket::ServerSocket socket;
|
2024-11-18 12:35:38 +01:00
|
|
|
};
|
|
|
|
};
|