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()  : void
close the connection of the event source
send()  : void
send a message to the client

Methods

close()

close the connection of the event source

public close() : void
Tags
since
8.0.0

send()

send a message to the client

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

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

$data : mixed = null
Tags
since
8.0.0
Return values
void

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


        
On this page

Search results