Skip to content

daffa09/learn-websocket-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket Practice

Description

This is a simple websocket practice project. It is a simple chat application that allows users to send messages to each other in real time. and it build just the Server, the client side is not included. And also this project is inspired by this video (https://youtu.be/BcuXtC4afzU?si=HPjwiARhpeWNKWOL)

Installation

make sure you already have go installed on your machine.

  1. Clone the repository
  2. run this command
go run main.go
  1. go to postman or any other tool that can send websocket request and send a request to, and make sure name is not empty
ws://localhost:9000/ws/chat?name=yourname
  1. then click connect, after conected then you can send message in field message
First Image

type the message in here

Second Image
  1. repeat step 3 and 4 to add more user and then see the magic
Third Image

message form user 1 is send to all user that connected to the server, as you can see i was in user2 request screen and then i get message from user1

About

Learn Webscoket With Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages