Beispiel #1
0
VRDataQueue VRNetClient::syncEventDataAcrossAllNodes(VRDataQueue eventQueue) {

  // 1. send inputEvents to server
  sendEventData(_socketFD, eventQueue.serialize());

  // 2. receive all events from the server
  VRDataQueue::serialData allEventData = waitForAndReceiveEventData(_socketFD);

  return VRDataQueue(allEventData);
}
Beispiel #2
0
PTHREAD catAggregatorDataUpdateFun(PVOID para) {
    cat_set_thread_name("cat-aggregator");

    while (!g_cat_aggregatorStop) {
        long long startTime = GetTime64();

        sendTransData();
        sendEventData();
        sendMetricData();
        // sendMetricTagData();

        long long duration = GetTime64() - startTime;

        if (duration < 1000) {
            Sleep(1000 - (int) duration);
        }
    }

    return 0;
}