@@ -115,15 +115,19 @@ /** * @brief Whether the socket can block. * * By default, a socket can block. + * + * @throw OFSetOptionFailedException The option could not be set */ @property (nonatomic) bool canBlock; /** * @brief Whether the socket can send to broadcast addresses. + * + * @throw OFSetOptionFailedException The option could not be set */ @property (nonatomic) bool canSendToBroadcastAddresses; /** * @brief The delegate for asynchronous operations on the socket. @@ -149,10 +153,12 @@ * @param buffer The buffer to write the datagram to * @param length The length of the buffer * @param sender A pointer to an @ref OFSocketAddress, which will be set to the * address of the sender * @return The length of the received datagram + * @throw OFReadFailedException Receiving failed + * @throw OFNotOpenException The socket is not open */ - (size_t)receiveIntoBuffer: (void *)buffer length: (size_t)length sender: (OFSocketAddress *)sender; @@ -228,10 +234,12 @@ * * @param buffer The buffer to send as a datagram * @param length The length of the buffer * @param receiver A pointer to an @ref OFSocketAddress to which the datagram * should be sent + * @throw OFWriteFailedException Sending failed + * @throw OFNotOpenException The socket is not open */ - (void)sendBuffer: (const void *)buffer length: (size_t)length receiver: (const OFSocketAddress *)receiver; @@ -295,10 +303,12 @@ - (void)cancelAsyncRequests; /** * @brief Closes the socket so that it can neither receive nor send any more * datagrams. + * + * @throw OFNotOpenException The socket is not open */ - (void)close; @end OF_ASSUME_NONNULL_END