Request
in package
implements
RequestInterface
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- Constructor for the Request class.
- send() : array<string|int, mixed>
- Method to send all data to the Websocket client which will connect to the relay(s).
- getResponseFromRelay() : array<string|int, mixed>
- Method to send a request using WebSocket client, receive responses, and handle errors.
Properties
$relays
RelaySet.
protected
RelaySet
$relays
$payload
Request message sent to relay.
private
string
$payload
Methods
__construct()
Constructor for the Request class.
public
__construct(Relay|RelaySet $relay, mixed $message) : mixed
Initializes the url and payload properties based on the provided websocket and message.
Parameters
send()
Method to send all data to the Websocket client which will connect to the relay(s).
public
send() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getResponseFromRelay()
Method to send a request using WebSocket client, receive responses, and handle errors.
private
getResponseFromRelay(Relay $relay) : array<string|int, mixed>
Parameters
- $relay : Relay