PHPackages                             horror/php-wss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. horror/php-wss

ActiveLibrary

horror/php-wss
==============

Web-socket server/client with URI parse and multi-process support

06PHP

Since Jul 9Pushed 2y agoCompare

[ Source](https://github.com/horror/php-wss)[ Packagist](https://packagist.org/packages/horror/php-wss)[ RSS](/packages/horror-php-wss/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-wss
=======

[](#php-wss)

Web-socket server/client with multi-process and parse templates support on server and send/receive options on client

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8115248f9b2aa87e5f4b58e345abdd3bda8f212c9d12bd497c49401f56289b45/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746875726b7573686d616e2f7068702d7773732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arthurkushman/php-wss/?branch=master)[![Build Status](https://camo.githubusercontent.com/3504dde08c08616ffac54ad2b379b3d49a93519b2202cdae4844b1a9ea508723/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746875726b7573686d616e2f7068702d7773732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arthurkushman/php-wss/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/e6a8dc7752c4487730f49d5a3402d39b16db4f1d55d0b5822291c2ddc2ff6151/68747470733a2f2f706f7365722e707567782e6f72672f6172746875726b7573686d616e2f7068702d7773732f762f737461626c65)](https://packagist.org/packages/arthurkushman/php-wss)[![Total Downloads](https://camo.githubusercontent.com/5caccf5b36add5f45e7fc9d2108c0584782a29564efca9d97251e3982cdb70f2/68747470733a2f2f706f7365722e707567782e6f72672f6172746875726b7573686d616e2f7068702d7773732f646f776e6c6f616473)](https://packagist.org/packages/arthurkushman/php-wss)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

Library comes with several main options
---------------------------------------

[](#library-comes-with-several-main-options)

Server:

- it`s a web-socket server for multiple connections with decoding/encoding for all events out of the box (with Dependency Injected MessageHandler)
- it has GET uri parser, so you can easily use any templates
- multiple process per user connections support, so you can fork processes to speed up performance deciding how many client-connections should be there
- broadcasting message(s) to all clients
- origin check
- ssl server run

Client:

- You have the ability to handshake (which is performed automatically) and send messages to server
- Receive a response from the server
- Initiate connection via proxy

How do I get set up?
--------------------

[](#how-do-i-get-set-up)

Preferred way to install is with Composer.

perform command in shell

```
 composer require arthurkushman/php-wss
```

OR

just add

```
"require": {
  "arthurkushman/php-wss": ">=1.3"
}
```

to your projects composer.json.

### Implement your WebSocket handler class - ex.:

[](#implement-your-websocket-handler-class---ex)

```
