send fd 无法传
string success = "1";
string urlstr =
"http://localhost:8080/getfilecontent?filename=630&auth_token=123";
Json::Value json;
//初始化json
json["url"] = Json::Value(urlstr);
json["success"] = Json::Value(success);
sock->sendOK(json.asString().c_str());
// sock->sendOK("dsfdfsdfsd");
// string retstr2 ="{\"url\":\"http://localhost:8080/getfilecontent?filename=630&auth_token=123\",\"success\":"1""}";
// sock->sendOK(json.asString().c_str());
// sock->sendOK(retstr2.c_str());
返回不找 json对象
真实环境:
string success = "1";
string urlstr =
"http://localhost:8080/getfilecontent?filename=630&auth_token=123";
Json::Value json;
//初始化json
json["url"] = Json::Value(urlstr);
json["success"] = Json::Value(success);
string s;
//json转字符串
s = json.toStyledString();
sock->sendOK(s.c_str());
浙公网安备 33010602011771号