You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1260,9 +1260,9 @@ libhttpserver provides WebSocket support when libmicrohttpd is built with WebSoc
1260
1260
### The websocket_handler class
1261
1261
The `websocket_handler` class provides the following virtual methods:
1262
1262
* _**void** on_open(**websocket_session&** session):_ Called when a new WebSocket connection is established. Default implementation does nothing.
1263
-
* _**void** on_message(**websocket_session&** session, **const std::string&** msg):_ Called when a text message is received. **This is the only pure virtual method and must be implemented.**
1263
+
* _**void** on_message(**websocket_session&** session, **std::string_view** msg):_ Called when a text message is received. **This is the only pure virtual method and must be implemented.**
1264
1264
* _**void** on_binary(**websocket_session&** session, **const void*** data, **size_t** len):_ Called when a binary message is received. Default implementation does nothing.
1265
-
* _**void** on_ping(**websocket_session&** session, **const std::string&** payload):_ Called when a ping frame is received. Default implementation sends a pong.
1265
+
* _**void** on_ping(**websocket_session&** session, **std::string_view** payload):_ Called when a ping frame is received. Default implementation sends a pong.
1266
1266
* _**void** on_close(**websocket_session&** session, **uint16_t** code, **const std::string&** reason):_ Called when the WebSocket connection is closed. Default implementation does nothing.
1267
1267
1268
1268
### The websocket_session class
@@ -1283,8 +1283,8 @@ Register a WebSocket handler using `register_ws_resource`:
0 commit comments