Skip to content

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

juniorriau/websocket-framework

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket Framework v0.0.3

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.

All you have to do is : create what you have in mind !

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

Please note : this is an early version so the API is likely to change eventually.

Features

  • 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 architechture 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 Game

		<img src="https://raw.github.com/wmcmurray/websocket-framework/dev/screenshots/demo-game.jpg" width="694">
		<ul>
			<li>Players state are kept on the server, only keyboard events data are sent</li>
			<li>Client-side movements predictions</li>
			<li>Simple in-game chat</li>
			<li>NPCs with a very basic AI</li>
			<li>Support for different areas with different players inside</li>
			<li>Players state can be saved in text files (JSON format)</li>
		</ul>
	</td>
</tr>
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
  • [/] Create a 2D game demo (in progress...)
  • 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

No packages published

Languages

  • PHP 48.6%
  • JavaScript 30.4%
  • HTML 17.4%
  • CSS 2.8%
  • Batchfile 0.8%