ytake/socketio-cli 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ytake/socketio-cli

最新稳定版本:v2.0.3

Composer 安装命令:

composer require ytake/socketio-cli

包简介

Send events and receive socket.io PHP client

README 文档

README

MIT Licenced

install

    "require": {
        "ytake/socketio-cli": "dev-master"
    },

Send messages and Receive

// namespace support
$client->client("http://localhost:3000")->query(['query' => 1])
    // namespace
    ->of('/active')->connection(function() use($client){
            // event receive
            $client->on('connection', function($data) use($client){
                    // value from socket.io server
                    var_dump($data);
                });
            // event emit
            $client->emit('sender', ['hello']);
            // event receive
            $client->on('message', function($data) use($client){
                    // value from socket.io server
                    var_dump($data);
                    $client->disconnect();
                });
        })->keepAlive();

Licence

This software is distributed under MIT License. See license.txt file for more info.

Special Thanks

Special thanks goes to Wisembly team authors of Elephant.io

统计信息

  • 总下载量: 790
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 332
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-14