Skip to content

Commit

Permalink
Create main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 6, 2024
1 parent dfbc74b commit 9613b6d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions blockchain_integration/pi_network/dapi/node/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "node.h"

int main() {
Node node("node1", "localhost:8080");
node.init();

// Register other nodes
node.register_node("node2", "localhost:8081");
node.register_node("node3", "localhost:8082");

// Send messages to other nodes
node.handle_message("Hello, node2!", "node2");
node.handle_message("Hello, node3!", "node3");

// Shutdown the node
node.shutdown();

return 0;
}

0 comments on commit 9613b6d

Please sign in to comment.