mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine http
This commit is contained in:
parent
6fccfa061d
commit
4325809daf
9 changed files with 190 additions and 16 deletions
|
@ -312,6 +312,8 @@ int run()
|
|||
return run_master();
|
||||
}
|
||||
|
||||
#include <srs_app_http.hpp>
|
||||
#include <srs_app_http_client.hpp>
|
||||
int run_master()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
@ -327,6 +329,22 @@ int run_master()
|
|||
if ((ret = _srs_server->initialize_st()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
/*SrsHttpClient client;
|
||||
SrsHttpUri uri;
|
||||
if ((ret = uri.initialize("http://ossrs.net:8081/live/livestream.flv")) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
SrsHttpMessage* msg = NULL;
|
||||
if ((ret = client.get(&uri, "", &msg)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
for (;;) {
|
||||
ISrsHttpResponseReader* br = msg->body_reader();
|
||||
std::string data;
|
||||
if ((ret = br->read(0, data)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
}*/
|
||||
|
||||
if ((ret = _srs_server->listen()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue