An abstract base class with common stuff for UDP sockets.
More...
#include <sos/udpsocket.h>
|
virtual | ~UDPSocket () |
| destructor
|
|
int | fd () |
| get the file descriptor for the socket
|
|
void | send (csr message) |
| send a message via the socket's file descriptor More...
|
|
void | recv (std::string &message, std::string &host, int &port) |
| wait for the next incoming message More...
|
|
|
struct sockaddr_in | addr |
| internal address structure
|
|
unsigned int | addr_len |
| size of address structure
|
|
int | sd |
| file descriptor
|
|
An abstract base class with common stuff for UDP sockets.
The common code for client and server udp sockets which manages the file descriptor and the buffer for the messages.
void UDPSocket::recv |
( |
std::string & |
message, |
|
|
std::string & |
host, |
|
|
int & |
port |
|
) |
| |
wait for the next incoming message
- Parameters
-
message | a string into which the message is placed |
host | the host name of the sending machine |
port | the port of the sending machine. |
void UDPSocket::send |
( |
csr |
message | ) |
|
send a message via the socket's file descriptor
- Parameters
-
const int VICI::cfi::UDPSocket::BUFFER_SIZE = 16000 |
|
static |
the max size for udp packets is 64K but we should keep them as small as possible and send several if needs be.
The documentation for this class was generated from the following files: