Nextcloud PHP API (master)

IEventSource

wrapper for server side events (http://en.wikipedia.org/wiki/Server-sent_events) includes a fallback for older browsers and IE

use server side events with caution, to many open requests can hang the server

The event source will initialize the connection to the client when the first data is sent

Tags
since
8.0.0

Table of Contents

Methods

close()  : mixed
close the connection of the event source
send()  : mixed
send a message to the client

Methods

close()

close the connection of the event source

public close() : mixed
Tags
since
8.0.0

send()

send a message to the client

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

One of success, notice, error, failure and done. Used in core/js/update.js

$data : mixed = null

if only one parameter is given, a typeless message will be send with that parameter as data

Tags
since
8.0.0

        
On this page

Search results