OC_EventSource

class OC_EventSource
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
Source:lib/private/legacy/eventsource.php#35
Implements:OCP\IEventSource

Properties

Methods

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

lib/private/legacy/eventsource.php#102

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/eventsource.php#128