Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: WebSocketServerTest
WebSocketHandler.h@1:db4114d55f83, 2015-03-25 (annotated)
- Committer:
- flatbird
- Date:
- Wed Mar 25 00:08:17 2015 +0000
- Revision:
- 1:db4114d55f83
- Parent:
- 0:a816c25e83ed
use strncasecmp to compare header. IE uses "Upgrade: Websocket".
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| flatbird | 0:a816c25e83ed | 1 | #ifndef _WEB_SOCKET_HANDLER_H_ |
| flatbird | 0:a816c25e83ed | 2 | #define _WEB_SOCKET_HANDLER_H_ |
| flatbird | 0:a816c25e83ed | 3 | |
| flatbird | 0:a816c25e83ed | 4 | class WebSocketHandler |
| flatbird | 0:a816c25e83ed | 5 | { |
| flatbird | 0:a816c25e83ed | 6 | public: |
| flatbird | 0:a816c25e83ed | 7 | virtual void onOpen() {}; |
| flatbird | 0:a816c25e83ed | 8 | virtual void onClose() {}; |
| flatbird | 0:a816c25e83ed | 9 | // to receive text message |
| flatbird | 0:a816c25e83ed | 10 | virtual void onMessage(char* text) {}; |
| flatbird | 0:a816c25e83ed | 11 | // to receive binary message |
| flatbird | 0:a816c25e83ed | 12 | virtual void onMessage(char* data, size_t size) {}; |
| flatbird | 0:a816c25e83ed | 13 | virtual void onError() {}; |
| flatbird | 0:a816c25e83ed | 14 | }; |
| flatbird | 0:a816c25e83ed | 15 | |
| flatbird | 0:a816c25e83ed | 16 | #endif |