mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #1635, support auto reaload config by inotify. 3.0.129
This commit is contained in:
parent
4b395f6e16
commit
9b663c070a
10 changed files with 193 additions and 14 deletions
|
@ -184,6 +184,25 @@ private:
|
|||
static void sig_catcher(int signo);
|
||||
};
|
||||
|
||||
// Auto reload by inotify.
|
||||
// @see https://github.com/ossrs/srs/issues/1635
|
||||
class SrsInotifyWorker : public ISrsCoroutineHandler
|
||||
{
|
||||
private:
|
||||
SrsServer* server;
|
||||
SrsCoroutine* trd;
|
||||
srs_netfd_t inotify_fd;
|
||||
int watch_fd;
|
||||
public:
|
||||
SrsInotifyWorker(SrsServer* s);
|
||||
virtual ~SrsInotifyWorker();
|
||||
public:
|
||||
virtual srs_error_t start();
|
||||
// Interface ISrsEndlessThreadHandler.
|
||||
public:
|
||||
virtual srs_error_t cycle();
|
||||
};
|
||||
|
||||
// A handler to the handle cycle in SRS RTMP server.
|
||||
class ISrsServerCycle
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue