MCPcopy Create free account
hub / github.com/AutoCodeStack/ios-device-farm / handleCommand

Function handleCommand

src/server/sock.handler.ts:7–18  ·  view source on GitHub ↗
(socket: Socket, data: any, callback: Function)

Source from the content-addressed store, hash-verified

5import { DeviceManager } from "../modules/device-management/device.manager";
6
7const handleCommand = async (socket: Socket, data: any, callback: Function) => {
8 try {
9 const ideviceFarm = IDFMap.client_map.get(socket.id);
10 if (ideviceFarm) {
11 await ideviceFarm.sendCommand(data);
12 return;
13 }
14 } catch (error: Error | any) {
15 logger.error(`Error fetching devices from device manager`);
16 return;
17 }
18};
19
20const handleDevicePrepare = async (socket: Socket, data: any, callback: Function) => {
21 try {

Callers 1

initializeSocketFunction · 0.90

Calls 1

sendCommandMethod · 0.80

Tested by

no test coverage detected