interface WebSocketConnection

Methods

int|string
id()

Get the raw socket connection identifier.

void
send(mixed $message)

Send a message to the connection.

void
control(int $opcode)

Send a control frame to the connection.

void
close(mixed $message = null, int|null $code = null, string|null $reason = null)

Close the connection.

Details

at line 12
int|string id()

Get the raw socket connection identifier.

Return Value

int|string

at line 17
void send(mixed $message)

Send a message to the connection.

Parameters

mixed $message

Return Value

void

at line 22
void control(int $opcode)

Send a control frame to the connection.

Parameters

int $opcode

Return Value

void

at line 27
void close(mixed $message = null, int|null $code = null, string|null $reason = null)

Close the connection.

Parameters

mixed $message
int|null $code
string|null $reason

Return Value

void