21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
+
+
|
/*! @file */
@class OFUDPSocket;
@class OFException;
/*!
* @struct of_udp_socket_address_t OFUDPSocket.h ObjFW/OFUDPSocket.h
*
* @brief A struct which represents a host / port pair for a UDP socket.
*/
typedef struct {
struct sockaddr_storage address;
socklen_t length;
} of_udp_socket_address_t;
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
+
+
|
*/
typedef bool (^of_udp_socket_async_receive_block_t)(OFUDPSocket *socket,
void *buffer, size_t length, of_udp_socket_address_t sender,
OFException *exception);
#endif
/*!
* @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h
*
* @brief A class which provides functions to create and use UDP sockets.
*
* Addresses are of type @ref of_udp_socket_address_t. You can use @ref
* getHost:andPort:forAddress: to create an address for a host / port pair and
* @ref getHost:andPort:forAddress: to get the host / port pair for an address.
* If you want to compare two addresses, you can use
* @ref of_udp_socket_address_equal and you can use
|