8000 GitHub - arunvm123/cli-chat: CLI chat room with grpc
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

arunvm123/cli-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-chat

chat-client

This is a project I build to learn a bit about grpc. I was planning to build a chat room where the client communicated with the server via grpc and was looking at some CLI based UI in Golang to implement the client with. That's when I came across this repo. The UI was exactly what I had in mind, so I decided to use it but with a grpc implementation.

When first running the client, the user has to enter their name after which the client receives a stream through which the server communicates. It is a one-way stream and only the server can stream data to the client. To send messages from the client, there is a separate broadcast function. The server receives the message and then broadcasts it to all open streams. When the client leaves the stream, it is closed and no more data can be sent on it. The UI is pretty simple and it was built with gocui.

How to run?

Run the server first

go run cmd/server/main.go

and then the client

go run cmd/client/main.go

and it should be working

About

CLI chat room with grpc

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0