rtmpUrlParser(url) { let urlInfo = Url.parse(url, true); urlInfo.app = urlInfo.path.split('/')[1]; urlInfo.port = !!urlInfo.port ? urlInfo.port : RTMP_PORT; urlInfo.tcurl = urlInfo.href.match(/rtmp:\/\/([^\/]+)\/([^\/]+)/)[0]; urlInfo.stream = urlInfo.path.slice(urlInfo.app.length + 2); return urlInfo; }
hostname: urlAsg.hostname, port: urlAsg.port || 80, path: urlAsg.path, method: req.method, headers: headers,
http.createServer(function (request, response) { var path = req.path; console.log(JSON.stringify(req));