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

support token auth in connect args. 0.9.128

This commit is contained in:
winlin 2014-06-21 11:41:00 +08:00
parent 6ff193c989
commit 10953c9743
14 changed files with 218 additions and 98 deletions

View file

@ -129,7 +129,7 @@ int SrsEdgeIngester::cycle()
srs_error("handshake with server failed. ret=%d", ret);
return ret;
}
if ((ret = client->connect_app(req->app, req->tcUrl)) != ERROR_SUCCESS) {
if ((ret = client->connect_app(req->app, req->tcUrl, req)) != ERROR_SUCCESS) {
srs_error("connect with server failed, tcUrl=%s. ret=%d", req->tcUrl.c_str(), ret);
return ret;
}

View file

@ -165,6 +165,11 @@ public:
SrsPlayEdge();
virtual ~SrsPlayEdge();
public:
/**
* always use the req of source,
* for we assume all client to edge is invalid,
* if auth open, edge must valid it from origin, then service it.
*/
virtual int initialize(SrsSource* source, SrsRequest* req);
/**
* when client play stream on edge.

View file

@ -146,10 +146,10 @@ int SrsRtmpConn::do_cycle()
srs_verbose("check vhost success.");
srs_trace("connect app, "
"tcUrl=%s, pageUrl=%s, swfUrl=%s, schema=%s, vhost=%s, port=%s, app=%s",
"tcUrl=%s, pageUrl=%s, swfUrl=%s, schema=%s, vhost=%s, port=%s, app=%s, args=%s",
req->tcUrl.c_str(), req->pageUrl.c_str(), req->swfUrl.c_str(),
req->schema.c_str(), req->vhost.c_str(), req->port.c_str(),
req->app.c_str());
req->app.c_str(), (req->args? "(obj)":"null"));
ret = service_cycle();
http_hooks_on_close();