IEventSource

interface OCP\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
Implemented by:OC_EventSource
Source:lib/public/IEventSource.php#35

Methods

public OCP\IEventSource::send($type, $data=null)
send a message to the client
Source:

lib/public/IEventSource.php#45

Parameters:
  • $type (string)
  • $data (mixed) if only one parameter is given, a typeless message will be send with that parameter as data
Since:

8.0.0

public OCP\IEventSource::close()
close the connection of the event source
Source:lib/public/IEventSource.php#51
Since:8.0.0