ObjFW
|
Go to the source code of this file.
Classes | |
struct | of_udp_socket_address_t |
A struct which represents a host / port pair for a UDP socket. More... | |
class | OFUDPSocket |
A class which provides functions to create and use UDP sockets. More... | |
Typedefs | |
typedef void(^ | of_udp_socket_async_resolve_block_t) (OFString *host, uint16_t port, of_udp_socket_address_t address, OFException *OF_NULLABLE exception) |
A block which is called when the host / port pair for the UDP socket has been resolved. More... | |
typedef bool(^ | of_udp_socket_async_receive_block_t) (OFUDPSocket *socket, void *buffer, size_t length, of_udp_socket_address_t sender, OFException *OF_NULLABLE exception) |
A block which is called when a packet has been received. More... | |
Functions | |
bool | of_udp_socket_address_equal (of_udp_socket_address_t *address1, of_udp_socket_address_t *address2) |
Compares two of_udp_socket_address_t for equality. More... | |
uint32_t | of_udp_socket_address_hash (of_udp_socket_address_t *address) |
Returns the hash for the specified of_udp_socket_address_t. More... | |
typedef bool(^ of_udp_socket_async_receive_block_t) (OFUDPSocket *socket, void *buffer, size_t length, of_udp_socket_address_t sender, OFException *OF_NULLABLE exception) |
A block which is called when a packet has been received.
socket | The UDP which received a packet |
buffer | The buffer the packet has been written to |
length | The length of the packet |
sender | The address of the sender of the packet |
exception | An exception which occurred while receiving or nil on success |
typedef void(^ of_udp_socket_async_resolve_block_t) (OFString *host, uint16_t port, of_udp_socket_address_t address, OFException *OF_NULLABLE exception) |
A block which is called when the host / port pair for the UDP socket has been resolved.
host | The host that has been resolved |
port | The port of the host / port pair |
address | The address of the resolved host / port pair |
exception | An exception which occurred while resolving or nil on success |
bool of_udp_socket_address_equal | ( | of_udp_socket_address_t * | address1, |
of_udp_socket_address_t * | address2 | ||
) |
Compares two of_udp_socket_address_t for equality.
address1 | The address to compare with the second address |
address2 | The second address |
uint32_t of_udp_socket_address_hash | ( | of_udp_socket_address_t * | address | ) |
Returns the hash for the specified of_udp_socket_address_t.
address | The address to hash |