jdare/clank-bundle 问题修复 & 功能扩展

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

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

jdare/clank-bundle

最新稳定版本:0.1.6

Composer 安装命令:

composer require jdare/clank-bundle

包简介

Symfony ClankBundle

README 文档

README

About

Clank is a Symfony2 Bundle designed to bring together WebSocket functionality in a easy to use application architecture.

Much like Socket.IO it provides both server side and client side code ensuring you have to write as little as possible to get your app up and running.

Powered By Ratchet and Autobahn JS, with Symfony2

Resources

Code Cookbook

Sample Projects

  • Clank Chat (View Source) This is a simple chat room site where a user can join any channel and chat to people there.

Installation Instructions

###Step 1: Install via composer Add the following to your composer.json

{
    "require": {
        "jdare/clank-bundle": "0.1.*"
    }
}

Then update composer to install the new packages:

php composer.phar update

###Step 2: Add to your App Kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new JDare\ClankBundle\JDareClankBundle(),
    );
}

###Step 3: Add to Assetic Bundles

Add "JDareClankBundle" to your assetic bundles in app/config (this is required to render the client side code).

# Assetic Configuration
assetic:
    ...
    bundles:        [ JDareClankBundle ]

###Step 4: Configure WebSocket Server

Add the following to your app/config.yml

# Clank Configuration
clank:
    web_socket_server:
        port: 8080        #The port the socket server will listen on
        host: 127.0.0.1   #(optional) The host ip to bind to

Note: when connecting on the client, if possible use the same values as here to ensure compatibility for sessions etc.

Step 5: Launching the Server

The Server Side Clank installation is now complete. You should be able to run this from the root of your symfony installation.

php app/console clank:server

If everything is successful, you will see something similar to the following:

Starting Clank
Launching Ratchet WS Server on: *:8080

This means the websocket server is now up and running!

Next Steps

For further documentations on how to use Clank, please continue with the client side setup.

统计信息

  • 总下载量: 981.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 130
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 130
  • Watchers: 11
  • Forks: 31
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-02