Differences From Artifact [b1604a829a]:
- File src/OFUDPSocket.h — part of check-in [b16f2b9e25] at 2018-07-28 17:38:30 on branch trunk — Rename of_{udp_ -> }socket_address (user: js, size: 11910) [annotate] [blame] [check-ins using]
To Artifact [362b51f3c0]:
- File
src/OFUDPSocket.h
— part of check-in
[8aeee6680a]
at
2018-07-28 20:21:01
on branch trunk
— Add of_socket_address_ip_string()
This replaces of_address_to_string_and_port(). (user: js, size: 11356) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
81 82 83 84 85 86 87 | /*! * @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h * * @brief A class which provides methods to create and use UDP sockets. * * Addresses are of type @ref of_socket_address_t. You can use * @ref resolveAddressForHost:port:address: to create an address for a host / | | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | /*! * @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h * * @brief A class which provides methods to create and use UDP sockets. * * Addresses are of type @ref of_socket_address_t. You can use * @ref resolveAddressForHost:port:address: to create an address for a host / * port pair and @ref of_socket_address_ip_string to get the IP string / port * pair for an address. If you want to compare two addresses, you can use * @ref of_socket_address_equal and you can use @ref of_socket_address_hash to * get a hash to use in e.g. @ref OFMapTable. * * @warning Even though the OFCopying protocol is implemented, it does *not* * return an independent copy of the socket, but instead retains it. * This is so that the socket can be used as a key for a dictionary, * so context can be associated with a socket. Using a socket in more |
︙ | ︙ | |||
157 158 159 160 161 162 163 | */ + (void)asyncResolveAddressForHost: (OFString *)host port: (uint16_t)port block: (of_udp_socket_async_resolve_block_t)block; # endif #endif | < < < < < < < < < < < < < | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | */ + (void)asyncResolveAddressForHost: (OFString *)host port: (uint16_t)port block: (of_udp_socket_async_resolve_block_t)block; # endif #endif /*! * @brief Binds the socket to the specified host and port. * * @param host The host to bind to. Use `@"0.0.0.0"` for IPv4 or `@"::"` for * IPv6 to bind to all. * @param port The port to bind to. If the port is 0, an unused port will be * chosen, which can be obtained using the return value. |
︙ | ︙ |