mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 22:46:30 +00:00
38 lines
709 B
C++
38 lines
709 B
C++
#pragma once
|
|
|
|
#include "socket.hpp"
|
|
#include <arpa/inet.h>
|
|
#include <cstdint>
|
|
#include <netdb.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <variant>
|
|
|
|
namespace slige_rpc {
|
|
|
|
/// - 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
|
|
class RpcServer {
|
|
public:
|
|
auto static bind(uint16_t port)
|
|
-> std::variant<slige_rpc::RpcServer, slige_socket::Ewwow>;
|
|
|
|
private:
|
|
RpcServer(slige_socket::ServerSocket socket)
|
|
: socket(socket)
|
|
{
|
|
}
|
|
slige_socket::ServerSocket socket;
|
|
};
|
|
};
|