| | |
| | | response["msg"] = rmsg; |
| | | response["payload"] = payload; |
| | | const std::string str = response.toStyledString(); |
| | | |
| | | err_msg(0, "login send back:\n %s", str.c_str()); |
| | | // nng内部会释放buf |
| | | rv = nng_send(sock, strdup(str.c_str()), str.length(), NNG_FLAG_ALLOC); |
| | | //free(buf); |
| | |
| | | |
| | | |
| | | int handleDownloadByTimeAsync(nng_socket sock, Json::Value request) { |
| | | std::cout << "accepted handleDownloadByTime request" << std::endl; |
| | | std::cout << "received downloadByTime request" << std::endl; |
| | | int rv; |
| | | char rmsg[MAXLINE]; |
| | | strcpy(rmsg, "received"); |
| | | strcpy(rmsg, "received downloadByTime request"); |
| | | // char *buf; |
| | | |
| | | Json::Value arguments = request["arguments"]; |