Skip to content

highlevellogic/achieve_rooms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Achieve_rooms is a very efficient ultralight-weight rooms program for use with the Achieve server and WS Websockets.

Requirements:

Quick Start

There is a quick start configuration / startup file available at Github: achieve_quick_start The quick start is configured to use rooms with the WS websocket app and Achieve server. To learn to customize for other uses, visit the npm pages for each application.

Using achieve_rooms

Once you have installed the components, read comments in achieve_quick_start.js and set file paths appropriately. When ready, run node achieve_quick_start.

To join a room, add a room name to the URI that is used in the websocket connection request, for example:

ws = new Websocket("ws://example.com:8440?room=myroom687");

This works reguardless of language used. Your connection will join the room when the connection request is made. If the room does not yet exist, it will be created. When everyone in a room disconnects, the room is deleted. If you do not specify a room, you will be in the lobby.

Specifying the room with the connection request helps make achieve_rooms run faster. Identifying and registering in a room happens only once. The room is associated with the connection itself, where it is directly, quickly and easily accessed by achieve_rooms. Room information is never needed with any message you send.

The other components

Achieve is a modern, high-performance, developer-friendly HTTP/S/2 web server. WS is advertised as being the fastest websocket server available for node. The quick start file mentioned above uses the "noserver" option for WS, which means that Achieve and WS use the same port numbers. This avoids problems with CORS. I have been using this combination for years, with great satisfaction.

Copyright and License

copyright © 2022, Roger F. Gay, may be freely distributed with the MIT license

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published