hlswmaster-ng/hlswserver.h

45 lines
703 B
C++

#ifndef _HLSWSERVER_H_
#define _HLSWSERVER_H_
#include <string.h>
#include "thread.h"
#include "config.h"
#include "gamelist.h"
#include "mutex.h"
class HlswServer : public Thread {
public:
HlswServer(Config& conf);
~HlswServer();
int execute(void* arg);
void rebuild(GameList& glist);
protected:
HlswServer(const HlswServer& hs);
HlswServer& operator=(const HlswServer& hs);
private:
class HlswPacket {
public:
HlswPacket(HlswPacket* next);
~HlswPacket();
bool addGame(GameEntry* ge);
void send(int socket, struct sockaddr_in* dst);
private:
HlswPacket* next;
int count;
char data[1418];
};
HlswPacket* pktlist;
Mutex mutex;
int sock;
};
#endif // _HLSWSERVER_H_