rllib
1
|
#include <rludpsocket.h>
Public Member Functions | |
rlUdpSocket (int debug=0) | |
virtual | ~rlUdpSocket () |
int | setSockopt (int opt) |
int | setSockopt (int level, int optname, void *optval, int optlen) |
int | bind (int port) |
int | select (int timeout) |
int | recvfrom (void *buf, int maxlen, rlIpAdr *source, int timeout=-1) |
int | sendto (const void *buf, int len, rlIpAdr *dest) |
int | printf (rlIpAdr *dest, const char *format,...) |
Public Attributes | |
int | debug |
int | readflag |
int | writeflag |
Private Attributes | |
struct sockaddr_in | address |
int | s |
class for encapsulating UDP socket calls
Definition at line 53 of file rludpsocket.h.
rlUdpSocket::rlUdpSocket | ( | int | debug = 0 | ) |
Definition at line 72 of file rludpsocket.cpp.
|
virtual |
Definition at line 86 of file rludpsocket.cpp.
int rlUdpSocket::bind | ( | int | port | ) |
int rlUdpSocket::printf | ( | rlIpAdr * | dest, |
const char * | format, | ||
... | |||
) |
return >= 0 -> number of bytes written else error
Definition at line 218 of file rludpsocket.cpp.
int rlUdpSocket::recvfrom | ( | void * | buf, |
int | maxlen, | ||
rlIpAdr * | source, | ||
int | timeout = -1 |
||
) |
return > 0 -> number of bytes read return == 0 -> timeout else error
Definition at line 160 of file rludpsocket.cpp.
int rlUdpSocket::select | ( | int | timeout | ) |
int rlUdpSocket::sendto | ( | const void * | buf, |
int | len, | ||
rlIpAdr * | dest | ||
) |
return >= 0 -> number of bytes written else error
Definition at line 198 of file rludpsocket.cpp.
int rlUdpSocket::setSockopt | ( | int | opt | ) |
int rlUdpSocket::setSockopt | ( | int | level, |
int | optname, | ||
void * | optval, | ||
int | optlen | ||
) |
|
private |
Definition at line 97 of file rludpsocket.h.
int rlUdpSocket::debug |
Definition at line 94 of file rludpsocket.h.
int rlUdpSocket::readflag |
Definition at line 94 of file rludpsocket.h.
|
private |
Definition at line 98 of file rludpsocket.h.
int rlUdpSocket::writeflag |
Definition at line 94 of file rludpsocket.h.