MCPcopy Create free account
hub / github.com/JoaoLopesF/RemoteDebug / onConnect

Method onConnect

src/RemoteDebug.cpp:203–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202class MyRemoteDebugCallbacks: public RemoteDebugWSCallbacks {
203 void onConnect() {
204 // Web socket (app) connected
205
206 D("rd: onconnect");
207
208 _connectedWS = true;
209
210 // Is telnet connected -> disconnect it, due reduce overheads
211
212 if (_instance->isConnected()) {
213
214 _instance->disconnect(true);
215 }
216
217 // Call same routine that telnet
218
219 _instance->onConnection(true);
220 }
221 void onDisconnect() {
222 // Web socket (app) disconnected
223

Callers 2

webSocketEventFunction · 0.80
asyncConnectMethod · 0.80

Calls 3

onConnectionMethod · 0.80
isConnectedMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected