mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #316, http api provides stream/vhost/srs/server bytes, codec and count. 2.0.136
This commit is contained in:
parent
2e9f2753c9
commit
5143e3a58d
17 changed files with 191 additions and 57 deletions
|
@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
SrsConnection::SrsConnection(SrsServer* srs_server, st_netfd_t client_stfd)
|
||||
{
|
||||
id = 0;
|
||||
server = srs_server;
|
||||
stfd = client_stfd;
|
||||
|
||||
|
@ -55,6 +56,8 @@ int SrsConnection::cycle()
|
|||
int ret = ERROR_SUCCESS;
|
||||
|
||||
_srs_context->generate_id();
|
||||
id = _srs_context->get_id();
|
||||
|
||||
ip = srs_get_peer_ip(st_netfd_fileno(stfd));
|
||||
|
||||
ret = do_cycle();
|
||||
|
@ -86,6 +89,11 @@ void SrsConnection::on_thread_stop()
|
|||
server->remove(this);
|
||||
}
|
||||
|
||||
int SrsConnection::srs_id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
void SrsConnection::stop()
|
||||
{
|
||||
srs_close_stfd(stfd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue