PHPackages                             gos/websocket-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. gos/websocket-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gos/websocket-client
====================

WAMP client in PHP

v1.5.0(4y ago)352.3M↓23.4%62MITPHPPHP ^7.2 || ^8.0CI failing

Since Feb 28Pushed 4y ago4 watchersCompare

[ Source](https://github.com/GeniusesOfSymfony/WebSocketPhpClient)[ Packagist](https://packagist.org/packages/gos/websocket-client)[ GitHub Sponsors](https://github.com/mbabker)[ RSS](/packages/gos-websocket-client/feed)WikiDiscussions 1.x Synced today

READMEChangelog (10)Dependencies (8)Versions (15)Used By (2)

**NOTE** - This repository is deprecated, future releases will only be made for critical bugs and security vulnerabilities. Use [Pawl](https://github.com/ratchetphp/Pawl) instead.

WebSocketPhpClient
==================

[](#websocketphpclient)

[![Latest Stable Version](https://camo.githubusercontent.com/c6bd1d41e99190cb013748229884d3d4f796094d1fe519b3f070b4b05437df91/68747470733a2f2f706f7365722e707567782e6f72672f676f732f776562736f636b65742d636c69656e742f762f737461626c65)](https://packagist.org/packages/gos/websocket-client) [![Latest Unstable Version](https://camo.githubusercontent.com/a3bbe1c07986df0a3ab52d79f0531d15a89545c284979d51c0e3d0b562fc383d/68747470733a2f2f706f7365722e707567782e6f72672f676f732f776562736f636b65742d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/gos/websocket-client) [![Total Downloads](https://camo.githubusercontent.com/344431fdec182f48c1f4d3ec677b3b2e6f54cf55c837621f344716777e2ae0da/68747470733a2f2f706f7365722e707567782e6f72672f676f732f776562736f636b65742d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/gos/websocket-client) [![License](https://camo.githubusercontent.com/478ab48b6410d702438c6b168565fdbb92ff00b6c8f131c269942f227de00f74/68747470733a2f2f706f7365722e707567782e6f72672f676f732f776562736f636b65742d636c69656e742f6c6963656e7365)](https://packagist.org/packages/gos/websocket-client)

About
-----

[](#about)

This package provides a PHP client that can send messages to a websocket server utilizing the WAMPv1 protocol. Listening for replies is not supported at this time.

Supported functions:

- prefix
- call
- publish
- event

Usage
-----

[](#usage)

### Directly Create A Client

[](#directly-create-a-client)

You can directly create a `Gos\Component\WebSocketClient\Wamp\ClientInterface` instance by creating a new `Gos\Component\WebSocketClient\Wamp\Client` object. The constructor has two mandatory requirements; the server host and port. You may review the [`Client class constructor`](/src/Wamp/Client.php) to see all arguments.

```
