|
AXCEL C++ Framework
Elegance through abstraction
|
User Datagram Protocol socket. More...
#include <axcel.h>
Public Member Functions | |
| udp () | |
| ~udp () | |
| virtual string | type () |
| Get type of object. | |
| virtual | operator string () |
| Convert to string. | |
| int | post (dgram dg) |
| Send datagram. | |
| net::dgram | get () |
| Get datagram. | |
| bool | bind (const char *port) |
| Bind to port. | |
| void | unbind () |
| Unbind from port. | |
| int | check () |
| Get size of next packet. | |
Public Attributes | |
| int | fd |
| bool axcel::net::socket::udp::bind | ( | const char * | port | ) |
Bind to port.
| port | Port or service name |
Assigns the specified port to this socket to prepare it for receiving packets. If a udp socket is not bound to a local address, the socket layer will automatically assign a free local port and bind the socket ot INADDR_ANY.
| int axcel::net::socket::udp::check | ( | ) |
| net::dgram axcel::net::socket::udp::get | ( | ) |
Get datagram.
Reads a datagram from this socket. The net::dgram object contains the peer ip address object, port number, and data object containing the datagram data. If no datagram is available, this method blocks until one can be read.
| axcel::net::socket::udp::operator string | ( | ) | [virtual] |
Convert to string.
Implements axcel::object.
| int axcel::net::socket::udp::post | ( | net::dgram | dg | ) |
| string axcel::net::socket::udp::type | ( | ) | [virtual] |
| void axcel::net::socket::udp::unbind | ( | ) |
1.7.4