Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Contains a generic PHP server and a JavaScript client. Just extend them to easily create wathever you want.

Notifications You must be signed in to change notification settings

wmcmurray/websocket-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket Framework v0.0.4

This project provide a way to easily create PHP websocket servers and JavaScript clients. You won't have to deal with socket listening, handshaking, data unmasking and such, it's all done by the framework.

Licence : GNU General Public License, version 3.0 (GPLv3)

Should you use it or not ?

This project is NOT MAINTAINED ANYMORE.

Well, it was a nice experiment with PHP websockets, but you definetly want to use NodeJS instead !

Features

  • Supports RFC 6455
  • Easy to use API
  • Only 10 lines of code to make a working server
  • Remote control of servers via a JavaScript client (kick clients, shutdown/reboot server, etc.)
  • Multiple servers architecture based on the same core
  • A groups system enabling internal communications between group clients (like a chatrooms in a chat)
  • Connected clients limit to prevent your servers from exploding

Documentation

Demos included

Realtime 2D RPG

  • Players state are kept on the server, only keyboard events data are sent
  • Client-side movements predictions
  • Simple in-game chat
  • NPCs with a very basic AI
  • Support for different areas with different players inside
  • Players state can be saved in text files (JSON format)
Realtime Chat Remote admin control panel Hello world

TODOs list

  • Add a raw transport layer (raw_send()) for people who wants full control over optimisation
  • Add possibility to create custom admin commands
  • Add an helper to save and retrieve data in text files
  • Finish the 2D game demo
  • Create a realtime website demo
  • Create an online radio demo
  • Add an admin command to buffer server errors and retrieve them via remote client
  • Add a way to ban a client definitively with the Admin API

About

Contains a generic PHP server and a JavaScript client. Just extend them to easily create wathever you want.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages