Initial commit of files
This commit is contained in:
59
include/libnet++/UdpThread.h
Normal file
59
include/libnet++/UdpThread.h
Normal file
@ -0,0 +1,59 @@
|
||||
//
|
||||
// UDP Thread
|
||||
//
|
||||
|
||||
/* prevent multiple inclusions */
|
||||
#ifndef __UdpThread__
|
||||
#define __UdpThread__
|
||||
|
||||
/* includes *****************************************************************/
|
||||
|
||||
#include "UdpClient.h"
|
||||
#include "Thread.h"
|
||||
|
||||
/* defines ******************************************************************/
|
||||
|
||||
/* macros *******************************************************************/
|
||||
|
||||
/* structs & typedefs *******************************************************/
|
||||
|
||||
/* c class definitions ******************************************************/
|
||||
|
||||
class UdpThread : public UdpClient, public Thread {
|
||||
// public data
|
||||
public:
|
||||
|
||||
// protected data
|
||||
protected:
|
||||
|
||||
// private data
|
||||
private:
|
||||
|
||||
// static data
|
||||
|
||||
// public methods
|
||||
public:
|
||||
// constructors
|
||||
UdpThread();
|
||||
|
||||
// destructor
|
||||
virtual ~UdpThread();
|
||||
|
||||
// public methods
|
||||
void SetSocket( int sock ) {Socket::SetSocket(sock);};
|
||||
|
||||
// virtual functions
|
||||
virtual void *Run(void *);
|
||||
|
||||
// exceptions
|
||||
class UdpThreadException
|
||||
{
|
||||
char *toString(void) { return strerror(errno); };
|
||||
};
|
||||
|
||||
// static methods
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user