Skip to content

A WebSocket Server written in C++ using Boost::Beast framework (with JWT auth).

Notifications You must be signed in to change notification settings

Al-Ghoul/Beast-WebSocketServer-Cpp

Repository files navigation

Beast-WebSocketServer-Cpp

As The name says this is a WebSocket Server written in C++ using Boost::Beast framework.

User Authentication

Once a user establishes a connection, the server expects a JWT that represents the user upon connection if the server couldn't read, verify and validate a JWT that is issued by the same WebServer referring to "GameServer-Mockup-Web" here (Validating with the same SECRET key for sure). The Connection is rejected.

After a Successful Connection the server notifies All currently connected users with the new user's presence/connection, Sends to the new user the previously/currently connected users. After that the Server acts like a State Machine that handles only a USER_MESSAGE request.

If you're going to use this for chat messages OR re-write your own, I've to say that the complexity is not worth it, you can use something like Socket.io or any other alternatives, However if you are to deploy an online game that's playable on browsers/mobile then performance is mandatory, a game like SlitherIO had it's server written using beast.

Technologies used in this project

About

A WebSocket Server written in C++ using Boost::Beast framework (with JWT auth).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages