MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / sendControlNow

Function sendControlNow

packages/client/src/app/AppShell.tsx:2286–2300  ·  view source on GitHub ↗
(udid: string, message: ControlMessage)

Source from the content-addressed store, hash-verified

2284 }
2285
2286 function sendControlNow(udid: string, message: ControlMessage): boolean {
2287 setLocalError("");
2288 const encoded = JSON.stringify(message);
2289 const dropIfBacklogged = isMoveControlMessage(message);
2290 if (sendWebRtcControlMessage(encoded, { dropIfBacklogged })) {
2291 return true;
2292 }
2293 if (sendControlSocketMessage(udid, encoded, dropIfBacklogged)) {
2294 return true;
2295 }
2296 if (remoteStream) {
2297 return false;
2298 }
2299 return false;
2300 }
2301
2302 function sendControlSocketMessage(
2303 udid: string,

Callers 2

sendControlFunction · 0.85
flushPendingControlMoveFunction · 0.85

Calls 3

isMoveControlMessageFunction · 0.90
sendWebRtcControlMessageFunction · 0.90
sendControlSocketMessageFunction · 0.85

Tested by

no test coverage detected