Updated readme
This commit is contained in:
parent
054e052da7
commit
1c9d8a4a05
52
README.md
52
README.md
@ -67,38 +67,82 @@ $http->listen($socket);
|
|||||||
|
|
||||||
#### connection
|
#### connection
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (WebSocketInterface $member)
|
||||||
|
```
|
||||||
|
|
||||||
This event is emitted when a new WebSocket request has been accepted. The `WebSocketConnection` is passed as the first argument.
|
This event is emitted when a new WebSocket request has been accepted. The `WebSocketConnection` is passed as the first argument.
|
||||||
|
|
||||||
### WebSocketConnection events
|
### WebSocketConnection events
|
||||||
|
|
||||||
#### ping
|
#### ping
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (string $payload)
|
||||||
|
```
|
||||||
|
|
||||||
This event will be emitted upon receiving a frame with a ping opcode. The pong response has already been sent automatically, unless 'no_auto_pong' is set in the context.
|
This event will be emitted upon receiving a frame with a ping opcode. The pong response has already been sent automatically, unless 'no_auto_pong' is set in the context.
|
||||||
|
|
||||||
#### pong
|
#### pong
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (string $payload)
|
||||||
|
```
|
||||||
|
|
||||||
This event will be emitted upon receiving a frame with a pong opcode.
|
This event will be emitted upon receiving a frame with a pong opcode.
|
||||||
|
|
||||||
#### text
|
#### text
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (string $payload)
|
||||||
|
```
|
||||||
|
|
||||||
This event will be emitted when a text data frame have been received and decoded.
|
This event will be emitted when a text data frame have been received and decoded.
|
||||||
|
|
||||||
#### binary
|
#### binary
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (string $payload)
|
||||||
|
```
|
||||||
|
|
||||||
This event will be emitted when a binary data frame have been received and decoded.
|
This event will be emitted when a binary data frame have been received and decoded.
|
||||||
|
|
||||||
#### close
|
#### close
|
||||||
|
|
||||||
|
```php
|
||||||
|
function ()
|
||||||
|
```
|
||||||
|
|
||||||
#### error
|
#### error
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (?string $reason, ?int $code)
|
||||||
|
```
|
||||||
|
|
||||||
### GroupManager events
|
### GroupManager events
|
||||||
|
|
||||||
### create
|
#### create
|
||||||
|
|
||||||
### destroy
|
```php
|
||||||
|
function (ConnectionGroup $group)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### destroy
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (ConnectionGroup $group)
|
||||||
|
```
|
||||||
|
|
||||||
### ConnectionGroup events
|
### ConnectionGroup events
|
||||||
|
|
||||||
### join
|
#### join
|
||||||
|
|
||||||
### leave
|
```php
|
||||||
|
function (WebSocketInterface $member)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### leave
|
||||||
|
|
||||||
|
```php
|
||||||
|
function (WebSocketInterface $member)
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user