@@ -22,11 +22,10 @@ OF_ASSUME_NONNULL_BEGIN /*! @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. @@ -46,12 +45,11 @@ * @param address The address of the resolved host / port pair * @param exception An exception which occurred while resolving 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 *_Nullable exception); + uint16_t port, of_udp_socket_address_t address, id _Nullable exception); /*! * @brief A block which is called when a packet has been received. * * @param socket The UDP which received a packet @@ -62,11 +60,11 @@ * 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 *_Nullable exception); + id _Nullable exception); #endif /*! * @class OFUDPSocket OFUDPSocket.h ObjFW/OFUDPSocket.h * @@ -125,12 +123,11 @@ * @param port The port for the resulting address * @param target The target on which to call the selector once the host has been * resolved * @param selector The selector to call on the target. The signature must be * `void (OFString *host, uint16_t port, - * of_udp_socket_address_t address, id context, - * OFException *exception)`. + * of_udp_socket_address_t address, id context, id exception)`. */ + (void)asyncResolveAddressForHost: (OFString *)host port: (uint16_t)port target: (id)target selector: (SEL)selector @@ -205,12 +202,11 @@ * when more datagrams have been received. If you want the next * method in the queue to handle the datagram received next, you * need to return false from the method. * @param selector The selector to call on the target. The signature must be * `bool (OFUDPSocket *socket, void *buffer, size_t length, - * of_udp_socket_address_t, id context, - * OFException *exception)`. + * of_udp_socket_address_t, id context, id exception)`. */ - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector