summaryrefslogtreecommitdiff
path: root/http/websocket_impl.hpp
AgeCommit message (Collapse)AuthorFilesLines
2025-06-11Show websocket timeout log as WARNINGMyung Bae1-3/+7
When websocket is closed due to a timeout under some situations like GUI console not as responsive, itis currently logged as ERROR. This commit changes it as WARNING. ``` May 02 10:09:31 ever28bmc pldmd[836]: BIOS attribute 'hb_cap_freq_mhz_min' updated to value '2000' by BMC 'false' May 02 10:09:31 ever28bmc pldmd[836]: BIOS attribute 'hb_cap_freq_mhz_max' updated to value '3900' by BMC 'false' May 02 10:09:31 ever28bmc bmcweb[1100]: [ERROR websocket.hpp:268] doRead error The socket was closed due to a timeout [boost.beast:1 at /usr/include/boost/beast/websocket/impl/stream_impl.hpp:346:13 in function 'bool boost::beast::websocket::stream< <template-parameter-1-1>, <anonymous> >::impl_type::check_stop_now(boost::beast::error_code&)'] May 02 10:09:34 ever28bmc pldmd[836]: BIOS attribute 'hb_max_number_huge_pages' updated to value '64' by BMC 'false' ``` Tested: - Load GUI pages and kill web-browser multiple times while reading BMC journal records. Change-Id: I7e15845be7d3762ef144744ca1aedadf96e43a2f Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2025-02-12Break out websocketsEd Tanous1-0/+361
When running clang build analyzer it shows that one of the largest templates in the Redfish compile unit (which is also the slowest compile unit) is actually the beast websocket instantiations, taking about 6 seconds to compile on their own. Luckily, the websocket layer is already split into Websocket and WebsocketImpl classes that we inherited from crow. Unfortunately, crow puts these two classes into the same file. So. 1. Move the WebSocketImpl class into its own header. 2. Move the websocket() upgrade routes in the websocket routing rule into their own compile unit to take advantage of only needing WebsocketImpl in this compile unit. Tested: Drops build time by several seconds depending on what other level of optimizations are present (1:15 -> 1:00) [1] https://github.com/aras-p/ClangBuildAnalyzer Change-Id: Ia0445eae4a793bb4ccb28136f30d2a05662c529c Signed-off-by: Ed Tanous <etanous@nvidia.com>