Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 1.12 KB

README.md

File metadata and controls

71 lines (51 loc) · 1.12 KB

Original

https://github.com/kappa-lab/very-simple-chat

What is this

  • Simple & Primitive multi client communication system.
    • e.g. chat system
  • for learning
seq03.mp4

Supported

  • Broadcast message
  • Unicast message

Not Supported

  • Multi Room
  • Error Handlling
  • Ping/Pong based Alive monitoring

Protocol

Structure

|----Header(1byte)-----|-----Body(max255byte)-----|
|     BodyLength       |          Body            |
|______________________|__________________________|

Usage

1. Setup

git clone [email protected]:kappa-lab/very-simple-chat.git

2. Run Server

cd very-simple-chat
go run .

3. Join client

  • Open new terminal (Establish Client Window)
cd very-simple-chat/client
go run .

4. Send Message

Input command into Client Window.

Broadcast

tartget:255, send all clients.

{"target":255, "message":"hello evrybody"}

Unicast

tartget:n(<255), send single clinet.

{"target":1, "message":"hello 1"}

5. Leave client

Ctrl+C