https://github.com/gbzarelli/gophertalk
GopherTalk is a multi-user chat powered by GO to explore its standard library and features like sockets, goroutines, channels and sync package.
https://github.com/gbzarelli/gophertalk
chat go gochat golang goroutines multiuser socket
Last synced: 3 months ago
JSON representation
GopherTalk is a multi-user chat powered by GO to explore its standard library and features like sockets, goroutines, channels and sync package.
- Host: GitHub
- URL: https://github.com/gbzarelli/gophertalk
- Owner: gbzarelli
- License: mit
- Created: 2022-01-01T22:08:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T00:34:07.000Z (over 3 years ago)
- Last Synced: 2025-01-22T03:35:20.690Z (5 months ago)
- Topics: chat, go, gochat, golang, goroutines, multiuser, socket
- Language: Go
- Homepage:
- Size: 435 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GopherTalk

GopherTalk is a multi-user chat powered by GO to explore its standard
library and features like sockets, goroutines, channels
and sync package.---
## The Project
The project was two binaries, the [server](./cmd/server.go) located in {project-dir}/cmd/server.go and the [client](./cmd/client.go) in {project-dir}/cmd/client.go

### Server
The server is responsible to maintain the channels with your clients open, and, redirect the messages to them.
The traffic between client-server-client is done by payloads in JSON formats established in the package internal / dto
Was use pure Socket channel to accept new clients. No specific protocol was used for communication.
### Client
The client just connect in the server (informed when start) and login with an uniq username, there is no authentication.
If the username was exists in the server, its reject and asked to reconnect.The client can talk with all people in the server or a specific user defined by command
#### Commands:
- `/help` : to show the help message
- `/users` : for list connected users
- `/to {user}` : to define the user to send the message
- `/all` : to define all people to send the message# Run
Build the project
```shell
>make build
```Run the server at port 8080:
```shell
>make run-server
```Run client:
```shell
>make run-client
```Enjoy!
# Contribute
Pull Requests are welcome. For important changes, open an 'issue' first to discuss what you would like to change. Be sure to update tests as appropriate.
# Developer
Guilherme Biff Zarelli
- Blog/Site - https://helpdev.com.br
- LinkedIn - https://linkedin.com/in/gbzarelli/
- GitHub - https://github.com/gbzarelli
- Medium - https://medium.com/@guilherme.zarelli
- Email - [email protected]