Download the PHP package stanislav-web/zf2-websocket-server-factory without Composer
On this page you can find all versions of the php package stanislav-web/zf2-websocket-server-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stanislav-web/zf2-websocket-server-factory
More information about stanislav-web/zf2-websocket-server-factory
Files in stanislav-web/zf2-websocket-server-factory
Package zf2-websocket-server-factory
Short Description ZF2 PHP WebSocket Server Factory v2.1 (Extended)
License MIT
Homepage https://github.com/stanislav-web/ZF2-PHP-WebSocket-Server-Factory
Informations about the package zf2-websocket-server-factory
ZF2 PHP WebSocket Server Factory v2.2.1 (Extended)
Protocol WebSocket (standard RFC 6455) is designed to solve any problems and the removal of restrictions communication between browser and server.It allows you to transfer any data to any domain, safe and almost without unnecessary network traffic.
The main advantages of this module is that you can create a variety of applications based on Zend Framework 2, where it is necessary to implement persistent connections. Thanks to one interface, you can create a variety of applications and run them on the same server. You can organize a chat, monitor live site visit, you can create real-time statistics and save it to DB (MySQL, Mongo..etc), you can organize the postal service in the likeness of Google. Yes, anything!
Requirements
- PHP 5.4+
- Zend Framework 2.4 >
Changes
v2.2.1 [Request from AdamiecRadek]
- Added support for changing default application namespace
- Added support for multiple namespaces for applications
- Hotfix for proper index in config
v2.1.1
- Fixed service locator which is got ApplicationFactory v2.1
- Select client's application from console like
php -q index.php websocket open <app>
v2.0
- Add "Chat" application as example
- More advanced interface
- Ability to create multiple applications and bind it to the same server
- Detailed log of each ping server's
- The ability to set the maximum number of connections to the server, the maximum number of connections per IP
- Pre defined response errors for Linux, Win platforms (extended by their descriptions)
- Ping using control frames such as PING PONG
v1.3
- Add logger
v1.2
- Add verbose turner (debug show\hide) (@see module.config.php)
- Add socket function's exception handler
- Fixed CLI stdout>> encoding
- Add ViewHelper for a simple get server config params into view
v1.1.2
- Console stdout>> while starting server
v1.1
- Fixes some problem with startup
- Add console command interface for costom system commands (for example)
php -q index.php websocket system "whoami"
(Note for ZF2.2): if you have an exceptionsNotice Undefined offset: 0
while starting console server please follow this:
vendor\ZF2\library\Zend\Mvc\View\Console\RouteNotFoundStrategy.php
381 and replace line by
It might be fixed until not fix in the next update. You're always can ask me for this module if you have write me issue
Installation and Running Server :
-
First update your dependencies through composer. Then run to update dependency and update autoloader
-
That needs to be done is adding it to your application's list of active modules. Add module "WebSockets" in your application.config.php
-
Perform module configuration file module.config.php
-
Go to your shell command-line interface and type (running server as background):
php -q index.php websocket open <app>
(app like as your client application) - Setup your Client-side script's to communicating with the server .. ws://host:port/websocket/open/
How can i do the Application ?
New application you can do according to the rules interface
As an example, you can see the implementation "Chat"
then call server from your cli controller
In order to start using the module clone the repo in your vendor directory or add it as a submodule if you're already using git for your project:
git clone https://github.com/stanislav-web/ZF2-PHP-WebSocket-Server-Factory.git vendor/WebSockets or git submodule add git clone https://github.com/stanislav-web/ZF2-PHP-WebSocket-Server-Factory.git vendor/WebSockets
The module will also be available as a Composer package soon.
Libraries used
- Zend Framework 2.4
- [WebSocket Protocol] (http://tools.ietf.org/html/rfc6455)
- This repository is the continuation of the module from which I started work [https://github.com/stanislav-web/ZF2-PHP-WebSocket-Server] (https://github.com/stanislav-web/ZF2-PHP-WebSocket-Server)