https://github.com/jerray/chatroom-grpc-example
A chatroom application to show how to use gRPC bidirectional streaming
https://github.com/jerray/chatroom-grpc-example
Last synced: 11 months ago
JSON representation
A chatroom application to show how to use gRPC bidirectional streaming
- Host: GitHub
- URL: https://github.com/jerray/chatroom-grpc-example
- Owner: jerray
- Created: 2018-12-16T17:06:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T17:06:43.000Z (over 7 years ago)
- Last Synced: 2025-03-11T08:34:50.246Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chatroom
gRPC bidirectional streaming example.
## Build
```sh
make build
```
## Run Server
```sh
./chatroom server -p 3000
```
## Run Client
```sh
./chatroom client -s 127.0.0.1:3000
```
Then type `#login [name]` to register a user name on server.
Open another terminal tab and start another client. Register another user.
Then users can chat with each other. Type something and press Enter in the
console, another user will receive the message.
### Client Commands
* `#login [name]` Register a user name
* `@[name] [message]` Send a message to a user
* `[message]` Send a message to all users in the chatroom
## Licence
MIT