Tiny IRC-like chat server written in Go
Go to file
raul a21199a6e0 Optimize client RAM memory usage
The receiveMessage() function would regularly keep casting strings based
on a 2048 byte array, this didn't seemingly pose a problem until I
noticed the RAM usage go through the roof when the client had to be
populated with the chat history of a lengthy chat log by the server. To
fix this I am now creating a second array using the number of bytes
being returned by the Read() method and copying the 2048 byte array's
contents into it, setting the former array to nil afterwards.
2024-05-14 15:31:55 +02:00
.gitea/workflows Only trigger CI/CD on PR 2024-05-08 08:01:19 +02:00
cmd Optimize client RAM memory usage 2024-05-14 15:31:55 +02:00
.gitignore Update .gitignore 2024-05-14 08:19:39 +02:00
.goreleaser.yaml Add go-audit workflow and goreleaser config 2024-04-01 12:23:29 +02:00
LICENSE Initial commit 2024-03-29 08:59:03 +01:00
README.md Update README.md 2024-05-14 10:05:02 +02:00
demo.gif Add demo.gif 2024-05-07 10:48:54 +02:00
go.mod Nuclear refactoring 2024-04-26 08:48:48 +02:00
go.sum Update dependencies 2024-04-12 08:55:59 +02:00
main.go Nuclear refactoring 2024-04-26 08:48:48 +02:00

README.md

mini-chat

Tiny IRC-like chat server written in Go

Commands

Client

Example:
 ./mini-chat client --ip 192.168.0.100 --port 1337

Usage:
  mini-chat client [flags]

Flags:
  -h, --help          help for client
      --insecure      [UNSAFE] Do not use TLS encryption
  -i, --ip string     Server IP to connect to
  -p, --port string   Server port to connect to (default "1302")

Server

Example:
 ./mini-chat server --port 1337

Usage:
  mini-chat server [flags]

Flags:
  -h, --help              help for server
  -r, --history string    File to store and recover chat history from
      --insecure          [UNSAFE] Do not use TLS encryption
      --password string   Password for accessing the chat server
  -p, --port string       port to use for listening (default "1302")