Skip to content
No description, website, or topics provided.
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
cmd
node
rpc/chat
.gitignore
README.md
go.mod
go.sum
protogen.sh

README.md

P2P GRPC Chat Client

Simple Golang implementation of a p2p chat client.

To install

1 - Clone the repo

$ git clone git@github.com:rumsrami/p2pchat-grpc.git

2 - cd into cmd/server and cmd/client and run go build

$ go build .

To run the server

Run multiple servers in different terminal windows with host and peer flags

./server --host <host>:<port> --peer <host>:<port>

$ ./server --host localhost:50050 --peer localhost:50051 

To run the client

Run multiple clients in different terminal windows with host flags, client should connect to one of the opened servers from the previous step

./client --host <host>:<port>

$ ./client --host localhost:50050

To start chatting

  1. Send messages through the client window
  2. Message will be delivered to the corresponding Server window.
  3. Server will connect to its peers and then deliver the message to them
  4. Messages will show in the other Server screens.

Known bugs

  1. Logs appear in the Server screen along with the chat messages
  2. If a peer disconnects and comes back, it will be still connected to the previous peers

Technology Used

  1. Go
  2. GRPC

License

License

You can’t perform that action at this time.