\adminmatrix\swoole\websocket\socketioPacket

Class Packet

Summary

Methods
Properties
Constants
__construct()
create()
toString()
fromString()
$type
$nsp
$data
$id
CONNECT
DISCONNECT
EVENT
ACK
CONNECT_ERROR
BINARY_EVENT
BINARY_ACK
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

CONNECT

CONNECT = 0

Socket.io packet type `connect`.

DISCONNECT

DISCONNECT = 1

Socket.io packet type `disconnect`.

EVENT

EVENT = 2

Socket.io packet type `event`.

ACK

ACK = 3

Socket.io packet type `ack`.

CONNECT_ERROR

CONNECT_ERROR = 4

Socket.io packet type `connect_error`.

BINARY_EVENT

BINARY_EVENT = 5

Socket.io packet type 'binary event'

BINARY_ACK

BINARY_ACK = 6

Socket.io packet type `binary ack`. For acks with binary arguments.

Properties

$type

$type

$nsp

$nsp

$data

$data

$id

$id

Methods

__construct()

__construct(int  $type) : mixed

Parameters

int $type

Returns

mixed —

create()

create(mixed  $type, array  $decoded = []) : mixed

Parameters

mixed $type
array $decoded

Returns

mixed —

toString()

toString() : mixed

Returns

mixed —

fromString()

fromString(string  $str) : mixed

Parameters

string $str

Returns

mixed —