MCPcopy Create free account
hub / github.com/bcndev/bytecoin / Server

Method Server

src/http/Server.cpp:62–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60using namespace http;
61
62Server::Server(const std::string &address, uint16_t port, request_handler &&r_handler, disconnect_handler &&d_handler)
63 : r_handler(std::move(r_handler)), d_handler(std::move(d_handler)) {
64 if (global_server)
65 throw std::runtime_error("You can have only 1 server for now");
66 global_server = this;
67}
68
69Server::~Server() {
70 if (global_server == this) // Must be always

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected