...
In the CeeCloudServer, add this to the main.js file, before the serverInstance.start(); line:
Code Block | ||
---|---|---|
| ||
serverInstance.addCustomPacketHandler("GetCustomData", (packetData, callback) => { console.log(`packetData: incomingPacketName:${packetData.incomingPacketName}, incomingData: ${JSON.stringify(packetData.incomingData, null, 2)}, modelKey: ${packetData.modelKey}, fullModelFileName: ${packetData.fullModelFileName}`); const customData = { myValue: 123, myString: "ABC" }; callback("CustomDataResponse", customData); }); |
...