Relay
in package
implements
RelayInterface
Table of Contents
Interfaces
Properties
- $message : MessageInterface
- The message to be sent.
- $payload : string
- The payload to be sent.
- $url : string
- The relay URL.
Methods
- __construct() : mixed
- Relay constructor.
- getUrl() : string
- Get URL of the relay.
- send() : CommandResultInterface
- Sends the message to the relay.
- setMessage() : void
- Set message that will be sent to the relay.
- setUrl() : void
- Set URL of the relay.
- setPayload() : void
Properties
$message
The message to be sent.
protected
MessageInterface
$message
$payload
The payload to be sent.
private
string
$payload
$url
The relay URL.
private
string
$url
Methods
__construct()
Relay constructor.
public
__construct(string $websocket[, MessageInterface $message = null ]) : mixed
Parameters
- $websocket : string
- $message : MessageInterface = null
getUrl()
Get URL of the relay.
public
getUrl() : string
Return values
stringsend()
Sends the message to the relay.
public
send() : CommandResultInterface
Return values
CommandResultInterfacesetMessage()
Set message that will be sent to the relay.
public
setMessage(MessageInterface $message) : void
Parameters
- $message : MessageInterface
setUrl()
Set URL of the relay.
public
setUrl(string $url) : void
Parameters
- $url : string
setPayload()
private
setPayload(string $payload) : void
Parameters
- $payload : string