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());

posted on 2019-11-29 14:29  lydstory  阅读(172)  评论(0)    收藏  举报

导航