]> git.vomp.tv Git - vompclient.git/blob - udp.h
Cross compiling... So close
[vompclient.git] / udp.h
1 /*
2     Copyright 2006 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP.  If not, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef UDP_H
21 #define UDP_H
22
23 #include <stdio.h>
24 #include <signal.h>
25 #include <ctype.h>
26
27 #include "defines.h"
28
29 #include "threadsystem.h"
30
31 class DatagramSocket;
32 class MessageQueue;
33 class Log;
34
35 class UDP : public Thread_TYPE
36 {
37   public:
38     UDP();
39     virtual ~UDP();
40
41     int run(MessageQueue* messageQueue);
42     int shutdown();
43
44   private:
45     void threadPostStopCleanup() {};
46
47     void threadMethod();
48     void processRequest(const void* data, UINT length);
49
50     int initted;
51     DatagramSocket* ds;
52     MessageQueue* messageQueue;
53     Log* log;
54 };
55
56 #endif