Unit 'fpHTTPClient' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TCustomHTTPEventSource

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for Server-Sent Events (SSE) client

Declaration

Source position: fphttpclient.pp line 55

type TCustomHTTPEventSource = class(TObject)

public

  constructor Create();

  

Creates a new Server-Sent Events source

  destructor Destroy; override;

  

Destroys the Server-Sent Events source

  function DataAvailable;

  

Checks if data is available for reading

  function ReadEvent();

  

Reads one Server-Sent Event from the stream

  procedure Close;

  

Closes the event source connection

  property Headers: TStrings; [r]

  

HTTP headers from the original Server-Sent Events request

  property EOF: Boolean; [r]

  

Indicates whether the event stream has ended

end;

Inheritance

TCustomHTTPEventSource

  

Base class for Server-Sent Events (SSE) client

|

TObject

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.

See also

THTTPEventSource

  

Default Server-Sent Events source implementation

TFPCustomHTTPClient.GetEventSource

  

Creates a Server-Sent Events connection


Documentation generated on: Jan 27 2026