| 82 | // Initialize the socket server |
| 83 | |
| 84 | void RemoteDebugWS::begin(RemoteDebugWSCallbacks* callbacks) { |
| 85 | |
| 86 | // Initialize web socket (RemoteDebugApp) |
| 87 | |
| 88 | WebSocketServer.begin(); // start the websocket server |
| 89 | WebSocketServer.onEvent(webSocketEvent); // if there's an incomming websocket message, go to function 'webSocketEvent' |
| 90 | |
| 91 | // Set callbacks |
| 92 | |
| 93 | _callbacks = callbacks; |
| 94 | |
| 95 | // Debug |
| 96 | |
| 97 | D("socket server started"); |
| 98 | |
| 99 | } |
| 100 | |
| 101 | // Finalize the socket server |
| 102 |