Skip to content

Armingodiz/Chat-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Chat server using websocket

This project is a good training for websockets, channels and Rabitmq .

Features

  • Chat with other users
  • Save messages for user and showing them after connecting to server

Installation

go get github.com/nhooyr/websocket ( I used this package instead of gorilla )

pulling rabbitmq image docker pull rabbitmq

running rabbitmq container sudo docker run -d --name testRabit -P rabbitmq:management

sudo docker port testRabit replace the "rabitPort" in rabitmq.go with the port befor the last port (in this example "32818")

Output

go run *.go

install websocat

Adding a client to server chat websocat ws:\\127.0.0.1:8080\

Register user {"id":your id}

sending message {"target":target Id ,"msg":your msg }

This project is a good practice for :

using context

websockets

Rabbitmq

net package in go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages