def __init__(<EOL>self, handler, max_length=MAX_LENGTH, timeout=None, reactor=None):
self._handler = handler<EOL>self._max_length = max_length<EOL>self._timeout = timeout<EOL>if reactor is None:<EOL><INDENT>from twisted.internet import reactor as _reactor<EOL>reactor = _reactor<EOL><DEDENT>self._reactor = reactor<EOL>self._waiting = []<EOL>self._buffer = b'<STR_LIT>'<EOL>self._reset_event_data()<EOL>
:param handler:
    A 2-args callable that will be called back with the event and data
    when a complete message is received.
:param int max_length:
    The maximum length in bytes of a single line in an SSE event that
    will be accepted.
:param float timeout:
    Amount of time in seconds to wait for some data to be received
    before timing out. (Default: None - no timeout).
:param reactor:
    Reactor to use to timeout the connection.