2017 © Pedro Peláez
 

lib tembo

Send events to socket.io though PHP

image

bazo/tembo

Send events to socket.io though PHP

  • Saturday, June 29, 2013
  • by bazo
  • Repository
  • 1 Watchers
  • 7 Stars
  • 1,595 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 258 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Tembo

MIT Licensed - Copyright © 2013. Martin Bažík, (*1)

About

Tembo is a rough socket.io client written in PHP. Its goal is to ease communications between your PHP application and a socket.io server. Protocol version of socket.io currently supported is 1. Only websocket transport is available at the moment., (*2)

Usage

Sending messages

use Tembo\Message;
use Tembo\SocketIOClient;

$client = new SocketIOClient('http://localhost:8000');

$client->connect();

//send message
$client->message($message);

//emit event
$args = [...];
$client->emit($event, $args);

$client->disconnect();

Listening to incoming messages

use Tembo\Message;

$callback = function($eventType, Message $message) {
    $eventName = $message->getName();
    $args = $message->getArgs();
};

$client->listen($callback);

Licence

This software is distributed under MIT License. See license.txt file for more info., (*3)

Special Thanks

Special thanks goes to Wisembly team authors of Elephant.io, (*4)

The Versions

29/06 2013

dev-master

9999999-dev

Send events to socket.io though PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Martin Bažík

php websocket nodejs socket.io