28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
* @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;
/*!
* @brief A block which is called when the host / port pair for the UDP socket
* has been resolved.
*
* @param host The host that has been resolved
* @param port The port of the host / port pair
* @param address The address of the resolved host / port pair
|
>
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
* @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;
#ifdef OF_HAVE_BLOCKS
/*!
* @brief A block which is called when the host / port pair for the UDP socket
* has been resolved.
*
* @param host The host that has been resolved
* @param port The port of the host / port pair
* @param address The address of the resolved host / port pair
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
* @param exception An exception which occurred while receiving or nil on
* success
* @return A bool whether the same block should be used for the next receive
*/
typedef bool (^of_udp_socket_async_receive_block_t)(OFUDPSocket *socket,
void *buffer, size_t length, of_udp_socket_address_t sender,
OFException *exception);
/*!
* @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.
|
>
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
* @param exception An exception which occurred while receiving or nil on
* success
* @return A bool whether the same block should be used for the next receive
*/
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
/*!
* @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.
|