29 #ifndef CFI_UDPSOCKET_H
30 #define CFI_UDPSOCKET_H
35 #include <sys/socket.h>
36 #include <netinet/in.h>
71 void operator = (
const UDPSocket & ) =
delete;
99 void recv( std::string &message, std::string &host,
int &port );
UDPClientSocket(csr host, int portid)
Constructor.
Definition: udpsocket.cpp:104
static const int BUFFER_SIZE
Definition: udpsocket.h:64
A UDP Server socket.
Definition: udpsocket.h:130
void send(csr message)
send a message via the socket's file descriptor
Definition: udpsocket.cpp:70
UDPServerSocket(int portid)
Constructor.
Definition: udpsocket.cpp:132
virtual ~UDPSocket()
destructor
Definition: udpsocket.cpp:61
An abstract base class with common stuff for UDP sockets.
Definition: udpsocket.h:56
int fd()
get the file descriptor for the socket
Definition: udpsocket.h:85
A UDP client socket.
Definition: udpsocket.h:110
UDPSocket()
constructor
Definition: udpsocket.cpp:48
void recv(std::string &message, std::string &host, int &port)
wait for the next incoming message
Definition: udpsocket.cpp:84
struct sockaddr_in addr
internal address structure
Definition: udpsocket.h:74
void send(csr message, csr host, int port)
send message to specified host and port. Used for replies.
Definition: udpsocket.cpp:148
unsigned int addr_len
size of address structure
Definition: udpsocket.h:75
const std::string & csr
short cut for string constants
Definition: vici.h:80
int sd
file descriptor
Definition: udpsocket.h:76