Websocket re-architecture with websocketd and websocat (#89)

- Replaced beast with websocketd and websocat. #79 #83 #84
- Implemented inbound/outbound peer connection merging.
- Added graceful shutdown of hpcore with sigint. #87
This commit is contained in:
Ravin Perera
2020-04-05 08:12:55 +05:30
committed by GitHub
parent 1904c1800a
commit 920be03ade
60 changed files with 1786 additions and 1753 deletions

View File

@@ -64,6 +64,9 @@ int parse_cmd(int argc, char **argv)
*/
void deinit()
{
usr::deinit();
p2p::deinit();
cons::deinit();
proc::deinit();
hplog::deinit();
}
@@ -72,6 +75,7 @@ void signal_handler(int signum)
{
LOG_WARN << "Interrupt signal (" << signum << ") received.";
deinit();
std::cout << "hpcore exiting\n";
exit(signum);
}
@@ -192,9 +196,7 @@ int main(int argc, char **argv)
signal(SIGINT, signal_handler);
while (true)
{
cons::consensus();
}
// Free resources.
deinit();