PHP Classes

Web Socket Service: Handle Web socket accesses using child processes

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (7)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 1,797 All time: 2,181 This week: 560Up
Version License PHP version Categories
web-socket-service 1GNU General Publi...5.3Networking, PHP 5, Unix, AJAX


This package can handle Web socket connections to establish asynchronous communications between browsers using JavaScript and PHP scripts.

There is one class that can listen to connections on a given port of an IP address. It creates child processes that will handle the Web socket communications, so if the child processes die it will not kill the main Web socket handling process.

A separate class can handle the communication between child and parent processes to process Web socket requests and return the request responses.

Applications can handle the Web socket requests by creating a sub-class of this last class.

Innovation Award
PHP Programming Innovation award winner
December 2011

Prize: One downloadable copy of PhpED Professional
Web sockets provide a means for browsers to establish two way communications with servers. The connections are kept alive while necessary.

This class implements a pure PHP robust Web socket protocol server that can handle multiple connections simultaneously using different child processes to handle each socket connection individually.

Manuel Lemos
Picture of Nathan Bruer
Name: Nathan Bruer is available for providing paid consulting. Contact Nathan Bruer .
Classes: 1 package by
Country: United States United States
Age: 36
All time rank: 1618239 in United States United States
Week rank: 214 Up30 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example init script to start a simple chat service
Accessible without login HTML file exampleChatRoom.html Example Example to work with the example.php script used once the example.php script is ran it will communicate with the service and allow asynchronous communications
Accessible without login Plain text file WebClientService.class.php Class Web Client process to handle communication between the web client and the server
Accessible without login Plain text file WebSocket.class.php Class Service class designed to be the master process, which forks the new processes and handles the distribution of cross data communication between the child processes.

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,181
This week:560Up
 User Ratings  
 All time