]> git.vomp.tv Git - vompclient.git/blob - udp.h
*** empty log message ***
[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, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef UDP_H
22 #define UDP_H
23
24 #include <stdio.h>
25 #include <signal.h>
26 #include <ctype.h>
27
28 #include "defines.h"
29 #include "log.h"
30 #include "dsock.h"
31 #include "messagequeue.h"
32
33 #ifdef WIN32
34 #include "threadwin.h"
35 #else
36 #include "threadp.h"
37 #endif
38
39 class UDP : public Thread_TYPE
40 {
41   public:
42     UDP();
43     virtual ~UDP();
44
45     int run(MessageQueue* commandMessageQueue);
46     int shutdown();
47
48   private:
49     void threadPostStopCleanup() {};
50
51     void threadMethod();
52     void processRequest(UCHAR* data, int length);
53
54     int initted;
55     DatagramSocket* ds;
56     MessageQueue* commandMessageQueue;
57     Log* log;
58 };
59
60 #endif