mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
luaserver: reorganize
Origin commit data
------------------
Branch: ni/coolstream
Commit: b2b7cd8bb1
Author: martii <m4rtii@gmx.de>
Date: 2014-10-13 (Mon, 13 Oct 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
50
src/system/luaserver.h
Normal file
50
src/system/luaserver.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
(C)2014 by martii
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __LUASERVER_H__
|
||||
#define __LUASERVER_H__
|
||||
#include <global.h>
|
||||
#include <semaphore.h>
|
||||
#include <connection/basicserver.h>
|
||||
|
||||
class CLuaServer
|
||||
{
|
||||
private:
|
||||
int count;
|
||||
pthread_t thr;
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
static void *luaserver_thread(void *arg);
|
||||
static void *luaserver_main_thread(void *);
|
||||
static bool luaserver_parse_command(CBasicMessage::Header &rmsg, int connfd);
|
||||
static void Lock();
|
||||
static void UnLock();
|
||||
CLuaServer();
|
||||
~CLuaServer();
|
||||
public:
|
||||
sem_t may_run;
|
||||
sem_t did_run;
|
||||
|
||||
void UnBlock();
|
||||
bool Block(const neutrino_msg_t msg, const neutrino_msg_data_t data);
|
||||
static CLuaServer *getInstance();
|
||||
static void destroyInstance();
|
||||
};
|
||||
#endif
|
Reference in New Issue
Block a user