EchoingWsWebApp.hpp
Go to the documentation of this file.
1 // @formatter:off
2 //
3 // Balau core C++ library
4 //
5 // Copyright (C) 2017 Bora Software (contact@borasoftware.com)
6 //
7 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
8 // See the LICENSE file for the full license text.
9 //
10 
16 
17 #ifndef COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_WS_WEB_APPS__ECHOING_WS_WEB_APP
18 #define COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_WS_WEB_APPS__ECHOING_WS_WEB_APP
19 
21 
23 
29 class EchoingWsWebApp : public WsWebApp {
30  public: void handleTextMessage(WsSession & session, std::string_view path) override;
31 
32  public: void handleBinaryMessage(WsSession & session, std::string_view path) override;
33 
34  public: void handleClose(WsSession & session, std::string_view path) override;
35 
36  public: void handlePing(WsSession & session, std::string_view path) override;
37 
38  public: void handlePong(WsSession & session, std::string_view path) override;
39 };
40 
41 } // namespace Balau::Network::Http::WsWebApps
42 
43 #endif // COM_BORA_SOFTWARE__BALAU_NETWORK_HTTP_SERVER_WS_WEB_APPS__ECHOING_WS_WEB_APP
void handlePong(WsSession &session, std::string_view path) override
Handle a received pong control message.
Abstract base class of WebSocket web application handlers.
Abstract base class of WebSocket web application handlers.
Definition: WsWebApp.hpp:36
void handleClose(WsSession &session, std::string_view path) override
Handle a received close control message.
void handleTextMessage(WsSession &session, std::string_view path) override
Handle received text data.
void handlePing(WsSession &session, std::string_view path) override
Handle a received ping control message.
WebSocket web application that echos messages back to the client.
Definition: EchoingWsWebApp.hpp:29
void handleBinaryMessage(WsSession &session, std::string_view path) override
Handle received binary data.
Manages the handling of WebSocket messages in a WebSocket connection.
Definition: WsSession.hpp:35
A set of WebSocket web apps provided by the Balau library.
Definition: EchoingWsWebApp.hpp:22