Skip to content

WIP, test P2P network for messaging other nodes in the network with interactive shell

License

Notifications You must be signed in to change notification settings

dills122/p2p-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test P2P Network

Experiment with P2P networks using gRPC in golang.

Getting Started

go get -u
go mod tidy

Generating proto files

protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/ping/ping.proto

Get info on all the available commands

go run ./main.go --help

You can do a test execution with the ping test command, this will setup two nodes that will ping each other.

go run ./main.go pingTest

Interactive Shell Mode

You can start up nodes in an interactive shell mode to allow you to communicate with the network.

go run ./main.go start --address 172.0.0.1:9999
# full list of args `cmd\node\start.go` init()

Once your node is booted up successfully, the interactive shell will start and you can begin to enter commands.

Currently the only working commands:

  • send - send a message to the network and to all online nodes
  • exit - shutdown node and exit network

About

WIP, test P2P network for messaging other nodes in the network with interactive shell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages