mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibWeb: Implement EventSource for server-sent events
EventSource allows opening a persistent HTTP connection to a server over which events are continuously streamed. Unfortunately, our test infrastructure does not allow for automating any tests of this feature yet. It only works with HTTP connections.
This commit is contained in:
parent
79223f3e1b
commit
eb3b8f8ee4
Notes:
sideshowbarker
2024-07-16 16:23:32 +09:00
Author: https://github.com/trflynn89
Commit: eb3b8f8ee4
Pull-request: https://github.com/SerenityOS/serenity/pull/24452
Issue: https://github.com/SerenityOS/serenity/issues/23847
12 changed files with 619 additions and 1 deletions
|
@ -64,6 +64,10 @@ public:
|
|||
|
||||
void queue_the_performance_observer_task();
|
||||
|
||||
void register_event_source(Badge<EventSource>, JS::NonnullGCPtr<EventSource>);
|
||||
void unregister_event_source(Badge<EventSource>, JS::NonnullGCPtr<EventSource>);
|
||||
void forcibly_close_all_event_sources();
|
||||
|
||||
void run_steps_after_a_timeout(i32 timeout, Function<void()> completion_step);
|
||||
|
||||
[[nodiscard]] JS::NonnullGCPtr<HighResolutionTime::Performance> performance();
|
||||
|
@ -103,6 +107,8 @@ private:
|
|||
// NOTE: See the PerformanceEntryTuple struct above for the map's value tuple.
|
||||
OrderedHashMap<FlyString, PerformanceTimeline::PerformanceEntryTuple> m_performance_entry_buffer_map;
|
||||
|
||||
HashTable<JS::NonnullGCPtr<EventSource>> m_registered_event_sources;
|
||||
|
||||
JS::GCPtr<HighResolutionTime::Performance> m_performance;
|
||||
|
||||
JS::GCPtr<IndexedDB::IDBFactory> m_indexed_db;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue