Documentation

Ping extends Message
in package

WebSocket\Message\Ping class.

A Ping WebSocket message.

Table of Contents

Properties

$content  : string
$opcode  : string
$timestamp  : DateTimeInterface

Methods

__construct()  : mixed
__toString()  : string
getContent()  : string
getFrames()  : array<string|int, mixed>
getLength()  : int
getOpcode()  : string
getPayload()  : string
getTimestamp()  : DateTimeInterface
hasContent()  : bool
setContent()  : void
setPayload()  : void
stringable()  : string

Properties

$opcode

protected string $opcode = 'ping'

$timestamp

protected DateTimeInterface $timestamp

Methods

__construct()

public __construct([string $content = '' ]) : mixed
Parameters
$content : string = ''

getContent()

public getContent() : string
Return values
string

getFrames()

public getFrames([int $frameSize = 4096 ]) : array<string|int, mixed>
Parameters
$frameSize : int = 4096
Return values
array<string|int, mixed>

getLength()

public getLength() : int
Return values
int

getOpcode()

public getOpcode() : string
Return values
string

getPayload()

public getPayload() : string
Return values
string

getTimestamp()

public getTimestamp() : DateTimeInterface
Return values
DateTimeInterface

hasContent()

public hasContent() : bool
Return values
bool

setContent()

public setContent([string $content = '' ]) : void
Parameters
$content : string = ''

setPayload()

public setPayload([string $payload = '' ]) : void
Parameters
$payload : string = ''

stringable()

protected stringable(string $format, mixed ...$values) : string
Parameters
$format : string
$values : mixed
Return values
string

        
On this page

Search results