An open API service indexing awesome lists of open source software.

https://github.com/hungneox/ratchet-demo


https://github.com/hungneox/ratchet-demo

php ratchet socket

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Ratchet demo

# Testing WebSocket applications

To test WebSocket applications, I can recommend the wscat tool. It is a command-line tool written in JavaScript (and thus requires Node.js to be running on your machine) and can be installed using npm, as follows:

```
$ npm install -g wscat
```

With the WebSocket server listening at port 8080, you can use wscat to open a new WebSocket connection using the following CLI command:

```
php server.php
```

Then

```
$ wscat -o localhost --connect localhost:8080/reverse
```