Wrench\Payload\HybiPayload¶
-
class
HybiPayload¶ Gets a HyBi payload
-
property
frames¶ protected array<Frame>
A payload may consist of one or more frames
-
getFrame()¶
-
getCurrentFrame()¶ Gets the current frame for the payload
Returns: mixed
-
getReceivingFrame()¶ Gets the frame into which data should be receieved
Returns: Frame
-
isComplete()¶ Whether the payload is complete
Returns: boolean
-
encode($data, $type = Protocol::TYPE_TEXT, $masked = false)¶ Encodes a payload
Parameters: - $data (string) –
- $type (int) –
- $masked (boolean) –
Returns: Payload
-
getRemainingData()¶ Gets the number of remaining bytes before this payload will be complete
May return 0 (no more bytes required) or null (unknown number of bytes required).
Returns: number|NULL
-
isWaitingForData()¶ Whether this payload is waiting for more data
Returns: boolean
-
receiveData($data)¶ Receive raw data into the payload
Parameters: - $data (string) –
Returns: void
-
getPayload()¶ Returns: string
-
__toString()¶ Returns: string
-
getType()¶ Gets the type of the payload
The type of a payload is taken from its first frame
Returns: int
-
property