PHP Classes

Web Socket Service: Handle Web socket accesses using child processes

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   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
Description 

Author

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
Winner


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: 37
All time rank: 1618240 in United States United States
Week rank: 206 Up24 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Files folder image Files (4)  
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.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,797
This week:0
All time:2,181
This week:560Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2694