Lines Matching defs:cmd
44 const std::string FORMAT_STR = "{ \"cmd\":%d, \"message\":\"%s\" }";
51 static void DecodeMessage(const char *buffer, size_t nread, uint32_t &cmd)
60 cmd = cJSON_GetNumberValue(cJSON_GetObjectItem(root, "cmd"));
61 printf("cmd: %d \n", cmd);
101 uint32_t cmd = 0;
102 DecodeMessage(reinterpret_cast<const char *>(buffer), nread, cmd);
113 uint32_t cmd = 0;
114 DecodeMessage(reinterpret_cast<const char *>(buffer), nread, cmd);
115 if (cmd == 5 || cmd == 2) { // 2 5 close server
133 uint32_t cmd = 0;
134 DecodeMessage(reinterpret_cast<const char *>(buffer), bufferSize, cmd);
135 if (cmd == 5) { // 5 close server