@@ -12,12 +12,10 @@ * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ -#include - #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif @@ -53,10 +51,24 @@ */ + (instancetype)exceptionWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket; +/*! + * @brief Creates a new, autoreleased connection failed exception. + * + * @param host The host to which the connection failed + * @param port The port on the host to which the connection failed + * @param socket The socket which could not connect + * @param errNo The errno of the error + * @return A new, autoreleased connection failed exception + */ ++ (instancetype)exceptionWithHost: (OFString*)host + port: (uint16_t)port + socket: (id)socket + errNo: (int)errNo; + /*! * @brief Initializes an already allocated connection failed exception. * * @param host The host to which the connection failed * @param port The port on the host to which the connection failed @@ -65,10 +77,24 @@ */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket; +/*! + * @brief Initializes an already allocated connection failed exception. + * + * @param host The host to which the connection failed + * @param port The port on the host to which the connection failed + * @param socket The socket which could not connect + * @param errNo The errno of the error + * @return An initialized connection failed exception + */ +- initWithHost: (OFString*)host + port: (uint16_t)port + socket: (id)socket + errNo: (int)errNo; + /*! * @brief Returns the socket which could not connect. * * @return The socket which could not connect */