Client
class Client
Class Client
Properties
| protected string | $endpoint | ||
| protected string | $serverHost | ||
| protected int | $serverPort | ||
| protected resource | $socket | ||
| protected bool | $connected | ||
| protected string | $sessionId | ||
| protected string | $origin | ||
| protected LoggerInterface | $logger | ||
| protected bool | $closing | ||
| protected bool | $secured | ||
| protected string | $target |
Methods
No description
No description
No description
No description
No description
No description
Read the buffer and return the oldest event in stack.
Disconnect.
Send message to the websocket.
Establish a prefix on server.
Call a procedure on server.
The client will send an event to all clients connected to the server who have subscribed to the topicURI.
Subscribers receive PubSub events published by subscribers via the EVENT message. The EVENT message contains the topicURI, the topic under which the event was published, and event, the PubSub event payload.
No description
No description
Details
at line 55
__construct(string $host, int|string $port, bool $secured = false, string $origin = null)
at line 78
setLogger(LoggerInterface $logger = null)
at line 86
setAuthenticationToken()
at line 99
string
connect(string $target = '/')
at line 128
protected string
upgradeProtocol(string $target)
at line 157
protected
verifyResponse($response)
at line 175
protected string
read()
Read the buffer and return the oldest event in stack.
at line 199
bool
disconnect()
Disconnect.
at line 235
protected $this|Client
send($data, $opcode = WebsocketPayload::OPCODE_TEXT, $masked = true)
Send message to the websocket.
at line 261
prefix(string $prefix, string $uri)
Establish a prefix on server.
at line 277
call(mixed $procUri, mixed $arguments = [])
Call a procedure on server.
at line 297
publish(string $topicUri, string $payload, array|string $exclude = [], array|string $eligible = [])
The client will send an event to all clients connected to the server who have subscribed to the topicURI.
at line 315
event(string $topicUri, string $payload)
Subscribers receive PubSub events published by subscribers via the EVENT message. The EVENT message contains the topicURI, the topic under which the event was published, and event, the PubSub event payload.