Events
class Events (View source)
Properties
| protected resource|null | $socket | The cloud socket. |
Methods
__construct(string $address)
Create a new instance.
void
emit(array $payload)
Emit an event.
void
emitMany(array $payloads)
Emit many events.
void
write(string $payload)
Write the payload to the socket.
string
format(array $payloads)
Format the payload.
void
ensureConnected()
Ensure the socket is connected.
void
connect()
Connect the socket.
bool
connected()
Determine if the socket is connected.
void
disconnect()
Disconnect the socket.
string
withSocketMetaData(string $message)
Decorate the message with the socket's meta data.
Details
__construct(string $address)
Create a new instance.
void
emit(array $payload)
Emit an event.
void
emitMany(array $payloads)
Emit many events.
protected void
write(string $payload)
Write the payload to the socket.
protected string
format(array $payloads)
Format the payload.
protected void
ensureConnected()
Ensure the socket is connected.
protected void
connect()
Connect the socket.
protected bool
connected()
Determine if the socket is connected.
protected void
disconnect()
Disconnect the socket.
protected string
withSocketMetaData(string $message)
Decorate the message with the socket's meta data.