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
|
||||
|
||||
```php
|
||||
function (WebSocketInterface $member)
|
||||
```
|
||||
|
||||
This event is emitted when a new WebSocket request has been accepted. The `WebSocketConnection` is passed as the first argument.
|
||||
|
||||
### WebSocketConnection events
|
||||
|
||||
#### 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.
|
||||
|
||||
#### pong
|
||||
|
||||
```php
|
||||
function (string $payload)
|
||||
```
|
||||
|
||||
This event will be emitted upon receiving a frame with a pong opcode.
|
||||
|
||||
#### text
|
||||
|
||||
```php
|
||||
function (string $payload)
|
||||
```
|
||||
|
||||
This event will be emitted when a text data frame have been received and decoded.
|
||||
|
||||
#### binary
|
||||
|
||||
```php
|
||||
function (string $payload)
|
||||
```
|
||||
|
||||
This event will be emitted when a binary data frame have been received and decoded.
|
||||
|
||||
#### close
|
||||
|
||||
```php
|
||||
function ()
|
||||
```
|
||||
|
||||
#### error
|
||||
|
||||
```php
|
||||
function (?string $reason, ?int $code)
|
||||
```
|
||||
|
||||
### GroupManager events
|
||||
|
||||
### create
|
||||
#### create
|
||||
|
||||
### destroy
|
||||
```php
|
||||
function (ConnectionGroup $group)
|
||||
```
|
||||
|
||||
#### destroy
|
||||
|
||||
```php
|
||||
function (ConnectionGroup $group)
|
||||
```
|
||||
|
||||
### ConnectionGroup events
|
||||
|
||||
### join
|
||||
#### join
|
||||
|
||||
### leave
|
||||
```php
|
||||
function (WebSocketInterface $member)
|
||||
```
|
||||
|
||||
#### leave
|
||||
|
||||
```php
|
||||
function (WebSocketInterface $member)
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user