class Sender

Properties

protected Server|null $server

Methods

__construct(Container $container)

No description

bool
__call(string $name, array $arguments)

Proxy push or disconnect calls to the Swoole server.

bool
pushFrame(int $fd, FrameInterface $frame)

Push a WebSocket frame to a file descriptor.

bool|null
proxy(int $fd, string $method, array $arguments)

Proxy a method call to the Swoole server for a specific file descriptor.

bool
check(int $fd)

Check if a file descriptor has an active WebSocket connection.

array
getFdAndMethodFromProxyMethod(string $method, array $arguments)

Validate and extract the file descriptor and method name from a proxy call.

Server
getServer()

Get the Swoole server instance.

bool
sendPipeMessage(string $name, array $arguments)

Send a pipe message to all other workers.

bool
push(int $fd, Frame|string $data, int $opcode = '1', int $flags = '1')

No description

bool
disconnect(int $fd, int $code = '1000', string $reason = '\'\'')

No description

Details

at line 25
__construct(Container $container)

No description

Parameters

Container $container

at line 32
bool __call(string $name, array $arguments)

Proxy push or disconnect calls to the Swoole server.

Parameters

string $name
array $arguments

Return Value

bool

at line 51
bool pushFrame(int $fd, FrameInterface $frame)

Push a WebSocket frame to a file descriptor.

Parameters

int $fd
FrameInterface $frame

Return Value

bool

at line 67
bool|null proxy(int $fd, string $method, array $arguments)

Proxy a method call to the Swoole server for a specific file descriptor.

Parameters

int $fd
string $method
array $arguments

Return Value

bool|null

at line 79
bool check(int $fd)

Check if a file descriptor has an active WebSocket connection.

Parameters

int $fd

Return Value

bool

at line 95
array getFdAndMethodFromProxyMethod(string $method, array $arguments)

Validate and extract the file descriptor and method name from a proxy call.

Parameters

string $method
array $arguments

Return Value

array

at line 107
protected Server getServer()

Get the Swoole server instance.

Return Value

Server

at line 121
protected bool sendPipeMessage(string $name, array $arguments)

Send a pipe message to all other workers.

Parameters

string $name
array $arguments

Return Value

bool

at line 21
bool push(int $fd, Frame|string $data, int $opcode = '1', int $flags = '1')

No description

Parameters

int $fd
Frame|string $data
int $opcode
int $flags

Return Value

bool

at line 21
bool disconnect(int $fd, int $code = '1000', string $reason = '\'\'')

No description

Parameters

int $fd
int $code
string $reason

Return Value

bool