Skip to content

Commit 7916586

Browse files
committed
initial commit
1 parent cfb6151 commit 7916586

File tree

8 files changed

+732
-0
lines changed

8 files changed

+732
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
composer.phar
22
/vendor/
3+
.idea
34

45
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
56
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
## Sample
3+
4+
```
5+
use Lessmore92\Swoole\WebSocketClient;
6+
use function Co\run;
7+
8+
require_once "vendor/autoload.php";
9+
10+
run(function () {
11+
$webSocketClient = new WebSocketClient('wss://socket.MyFancyApp.io:2053/app/app-key?protocol=7&client=js&version=7.0.6&flash=false');
12+
$webSocketClient->push('{"event":"pusher:subscribe","data":{"auth":"","channel":"msgs"}}');
13+
$webSocketClient->recv();
14+
15+
while ($webSocketClient->client->connected)
16+
{
17+
$data = $webSocketClient->recv()->data;
18+
var_dump($data);
19+
}
20+
});
21+
```

composer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "lessmore92/swoole-websocket-client",
3+
"description": "Easy-To-Use Swoole Websocket Client",
4+
"minimum-stability": "dev",
5+
"license": "library",
6+
"authors": [
7+
{
8+
"name": "Lessmore92",
9+
"email": "bahramisoft@gmail.com"
10+
}
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"Lessmore92\\Swoole\\": "src",
15+
"Lessmore92\\Psr\\": "src/Psr"
16+
}
17+
},
18+
"require": {
19+
"php": "^7.4|^8.0",
20+
"psr/http-message": "1.0.x-dev",
21+
"guzzlehttp/psr7": "2.4.x-dev"
22+
},
23+
"require-dev": {
24+
"swoole/ide-helper": "@dev"
25+
}
26+
}

composer.lock

Lines changed: 339 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)