Nextcloud PHP API (master)

IEventSource

Wrapper for Server-Sent Events (SSE).

Use SSE with caution: too many concurrent open requests can overload or stall the server.

The connection is opened lazily when the first event is sent.

Tags
see
https://developer.mozilla.org/docs/Web/API/Server-sent_events
since
8.0.0

Table of Contents

Methods

close()  : void
Closes the SSE connection.
send()  : void
Sends an event to the client.

Methods

close()

Closes the SSE connection.

public close() : void
Tags
since
8.0.0

send()

Sends an event to the client.

public send(string $type[, mixed $data = null ]) : void
Parameters
$type : string

Event type/name.

$data : mixed = null

Event payload.

If only one argument is provided, it is sent as a typeless payload (legacy behavior).

Tags
since
8.0.0

        
On this page

Search results