Declaration¶
Source position: fphttpclient.pp line 59
Inheritance¶
Description¶
TCustomHTTPEventSource provides Server-Sent Events functionality for receiving real-time data streams from HTTP servers. It handles the SSE protocol for parsing event streams and provides methods for reading events and checking data availability.
This class is used internally by the HTTP client for SSE support and can be extended for custom SSE implementations.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| EOF read only | public | Indicates whether the event stream has ended |
| Headers read only | public | HTTP headers from the original Server-Sent Events request |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Close | public | Closes the event source connection |
| Create | public | Creates a new Server-Sent Events source |
| DataAvailable | public | Checks if data is available for reading |
| Destroy | public | Destroys the Server-Sent Events source |
| ReadEvent | public | Reads one Server-Sent Event from the stream |
See also¶
| Name | Description |
|---|---|
| THTTPEventSource | Default Server-Sent Events source implementation |
| TFPCustomHTTPClient.GetEventSource | Creates a Server-Sent Events connection |