Documentation

SendMethodsTrait

WebSocket\Trait\SendMethodsTrait trait.

Conveniance send methods.

Table of Contents

Methods

binary()  : Binary
Send binary message.
close()  : Close
Tell the socket to close.
ping()  : Ping
Send ping.
pong()  : Pong
Send unsolicited pong.
text()  : Text
Send text message.

Methods

binary()

Send binary message.

public binary(string $message) : Binary
Parameters
$message : string

Content as binary string.

Return values
Binary

instance

close()

Tell the socket to close.

public close([int $status = 1000 ][, string $message = 'ttfn' ]) : Close
Parameters
$status : int = 1000

http://tools.ietf.org/html/rfc6455#section-7.4

$message : string = 'ttfn'

A closing message, max 125 bytes.

Return values
Close

instance

ping()

Send ping.

public ping([string $message = '' ]) : Ping
Parameters
$message : string = ''

Optional text as string.

Return values
Ping

instance

pong()

Send unsolicited pong.

public pong([string $message = '' ]) : Pong
Parameters
$message : string = ''

Optional text as string.

Return values
Pong

instance

text()

Send text message.

public text(string $message) : Text
Parameters
$message : string

Content as string.

Return values
Text

instance


        
On this page

Search results