summaryrefslogtreecommitdiff
path: root/http/app.hpp
diff options
context:
space:
mode:
authorV-Sanjana <sanjana.v@intel.com>2023-04-13 12:48:31 +0300
committerEd Tanous <ed@tanous.net>2023-06-01 23:43:11 +0300
commit88ada3bc05ea247b6c8a24db49ebfdd268c17f4d (patch)
treef9dc4aa1415ea50a7d62c348b1118e307eb11b6a /http/app.hpp
parent600af5f1ee6f3a589d5c1a7be31579ca705eef71 (diff)
downloadbmcweb-88ada3bc05ea247b6c8a24db49ebfdd268c17f4d.tar.xz
Add Server-Sent-Event support
Server-Sent-Event is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established. Unlike websockets (which are bidirectional), Server-Sent-Events(SSE) are unidirectional and commonly used to send message updates or continuous data streams to a browser client. This is base patch for adding Server-Sent-Events routing support to bmcweb. Redfish EventService SSE style subscription uses SSE route for sending the Events/MetricReports to client which establishes the connection. Tested this patch with along with EventService SSE support patches and verified the functionalty on browser. Tested: - Tested using follow-up patches on top which adds support for Redfish EventService SSE style subscription and observed events are getting sent periodically. - Created SSE subscription from the browser by visiting https://<BMC IP>/redfish/v1/EventService/SSE Change-Id: I36956565cbba30c2007852c9471f477f6d1736e9 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> Signed-off-by: V-Sanjana <sanjana.v@intel.com>
Diffstat (limited to 'http/app.hpp')
-rw-r--r--http/app.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/http/app.hpp b/http/app.hpp
index d3cf48c1b1..6388d84271 100644
--- a/http/app.hpp
+++ b/http/app.hpp
@@ -105,6 +105,11 @@ class App
router.validate();
}
+ static bool isSseRoute(Request& req)
+ {
+ return Router::isSseRoute(req);
+ }
+
void run()
{
validate();