Learning Golang. kthxbai.
go build ./cmd/p2p
- Run the first peer with the following command:
# ./p2p [-p listen-port]
go run ./cmd/p2p -p 5000
# after the other peer is running, connect to it
> !c localhost:5001
> !sa hi
- Run the second peer in another terminal with the following command:
go run ./cmd/p2p -p 5001
> !c localhost:5000
> !sa hello
Use !h
to see the list of available commands.