Skip to content

⚔️ Simple WebSocket server for P2P matchmaking with Go ⚔️

Notifications You must be signed in to change notification settings

ponyo877/easy-matchmaking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy-matchmaking

Simple WebSocket server implemented in Go and dedicated for P2P matchmaking.

Demo

demo

The following is being used as the backend service. Please try it out.
https://p2p-chat.pages.dev

Usage

Server start (defalt listen port: 8000, change -flag option)

go run ./main.go

Prepare two WebSocket clients, and perform the following commands on both of them (Websocket cli using: wscat)

$ wscat -c ws://localhost:8000/matchmaking
Connected (press CTRL+C to quit)
> {"user_id": "test-user1", "created_at": "2099-12-31T23:59:58+00:00"}
# if you matching:
< {"type":"MATCH","room_id":"68be89f","user_id":"test-user2","created_at":"2024-05-29T20:43:03.897592+09:00"}

Environment Variable

KEY Description
SLACK_WEBHOOK_ENDPOINT If you specify a Slack webhook endpoint, a message will be delivered when a user enters.

About

⚔️ Simple WebSocket server for P2P matchmaking with Go ⚔️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published