class CAVERNplus_udp_c : public CAVERNplus_socketbase_c UDP Class
| | clone () Make a clone of the current udp object |
| | close () Close the udp handle |
| | copyReceiveAddressToSendAddress () Copy the receive address to send address |
| | init (unsigned short port = 0) Open a socket |
|
| makeNonBlocking () Make a connection non blocking. |
|
| peek (char *message, int length) Peek at incoming packet. - without extracting it from the queue. |
|
| printInfo () Print information on the connection (IP address, port number etc). |
| | receive (char *message, int length) Receive data |
|
| send (char *message, int length) Send data. |
| | setSendAddress (char *host, unsigned short port) Set address to send to |
|
| Accessor Functions
|
|
| receiveAddress Socket structures. |
|
| sockfd Socket file descriptor. |
UDP Class. This class bypasses CAVERN's standard method for establishing connections and provides the user with direct control of UDP connections. The idea is that you first create a udp object and then call the init() method. (see init() method for more details).Then you can either Send data to a destination or receive any incoming data.
To send data to a destination you need to set the destination with the SetSendAddress method and then call the Send method.
To receive data, simply call the Receive method.
By default the connections are BLOCKING, meaning, if you call Receive and there is no data available to read your program will block until something comes along. To make your receives non blocking, call the MakeNonBlocking method.
int setSendAddress(char *host, unsigned short port)
void copyReceiveAddressToSendAddress()
CAVERNplus_udp_c* clone()
int receive(char *message, int length)
void close()
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de