Skip to content

PHP Push Server : allows a web server to push data to a browser.

Notifications You must be signed in to change notification settings

iGusev/CometServer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CometServer V2: allows a web server to push data to a browser

Comet application (also known as "Push server") written in php, using Ajax with the long polling technology which is the most popular technique in the Comet Programming. It provides a simple way to allow http server to push data to browser without using the classic Periodic refresh approach.

CometServer includes tow main components:

  • Comet server (or Push server):

Based on AF_UNIX socket for local communication protocol family and InterProcess Communication, the server is designed to transcend the remote socket limitation that require to allocate port on server which is not allowed by many web hosting service.

  • Comet client:

Tool to make communication easier between server daemon and http server.

Requirements

  • Operating system: Unix-like
  • php version 5.3 or higher
  • php libraries : posix, pcntl, xml
  • php command language interface
  • jQuery FW if you will use the native Comet helper "Comet\Web\JsHelper.php".

Installation

download application

$ git clone git://github.com/AliHichem/CometServer.git CometServer

install dependencies

$ git submodule update --init

add execution to "Comet"

$ chmod a+x CometServer/Comet

make "CometServer" folder writable

$ chmod a+w -R CometServer

Usage

Available commands are : start/stop/status/write/read/dump/help use help to get more informations.

start server

$ ./Comet start

depending on what you want to do with your CometServer, you may have to include CometServer classes to your web project:

<?php require_once "path_to_lib_folder_of_cometserver/config/bootstrap.php"; ?>

Exemples

There is already a good example under "examples" that demonstrate how to communicate with CometServer from your Http server, see jGrowl_notifier.

About

PHP Push Server : allows a web server to push data to a browser.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 88.0%
  • JavaScript 8.3%
  • CSS 3.3%
  • Gherkin 0.4%