Class ServerEventStream
java.lang.Object
cool.scx.http.media.event_stream.ServerEventStream
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ServerEventStream
public ServerEventStream(cool.scx.io.ByteOutput out)
-
-
Method Details
-
send
发送一个 SSE 事件- Parameters:
sseEvent- 要发送的 SSE 事件- Throws:
HttpSendException
-
close
public void close() throws cool.scx.io.exception.ScxIOException, cool.scx.io.exception.AlreadyClosedException- Specified by:
closein interfaceAutoCloseable- Throws:
cool.scx.io.exception.ScxIOExceptioncool.scx.io.exception.AlreadyClosedException
-