OC_EventSource

class OC_EventSource
wrapper for server side events (https://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
Source:lib/private/legacy/OC_EventSource.php#36
Implements:OCP\IEventSource

Properties

Methods

protected OC_EventSource::init()
Source:lib/private/legacy/OC_EventSource.php#52
public OC_EventSource::send($type, $data=\null)
send a message to the client
Source:

lib/private/legacy/OC_EventSource.php#103

Parameters:
  • $type (string)
  • $data (mixed)
Throws:

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

public OC_EventSource::close()
close the connection of the event source
Source:lib/private/legacy/OC_EventSource.php#129