https://github.com/hungneox/ratchet-demo
https://github.com/hungneox/ratchet-demo
php ratchet socket
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hungneox/ratchet-demo
- Owner: hungneox
- Created: 2018-04-13T11:47:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-13T11:47:40.000Z (over 7 years ago)
- Last Synced: 2025-02-09T19:54:20.514Z (9 months ago)
- Topics: php, ratchet, socket
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```