1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine code, extrat the ISrsHttpMessage.

This commit is contained in:
winlin 2015-05-22 22:24:05 +08:00
parent e2955da78f
commit ce1bb6c605
13 changed files with 1323 additions and 1202 deletions

View file

@ -71,7 +71,7 @@ int SrsHttpClient::initialize(string h, int p, int64_t t_us)
return ret;
}
int SrsHttpClient::post(string path, string req, SrsHttpMessage** ppmsg)
int SrsHttpClient::post(string path, string req, ISrsHttpMessage** ppmsg)
{
*ppmsg = NULL;
@ -104,7 +104,7 @@ int SrsHttpClient::post(string path, string req, SrsHttpMessage** ppmsg)
return ret;
}
SrsHttpMessage* msg = NULL;
ISrsHttpMessage* msg = NULL;
if ((ret = parser->parse_message(skt, NULL, &msg)) != ERROR_SUCCESS) {
srs_error("parse http post response failed. ret=%d", ret);
return ret;
@ -117,7 +117,7 @@ int SrsHttpClient::post(string path, string req, SrsHttpMessage** ppmsg)
return ret;
}
int SrsHttpClient::get(string path, std::string req, SrsHttpMessage** ppmsg)
int SrsHttpClient::get(string path, std::string req, ISrsHttpMessage** ppmsg)
{
*ppmsg = NULL;
@ -150,7 +150,7 @@ int SrsHttpClient::get(string path, std::string req, SrsHttpMessage** ppmsg)
return ret;
}
SrsHttpMessage* msg = NULL;
ISrsHttpMessage* msg = NULL;
if ((ret = parser->parse_message(skt, NULL, &msg)) != ERROR_SUCCESS) {
srs_error("parse http post response failed. ret=%d", ret);
return ret;