@@ -40,20 +40,20 @@ struct sockaddr_storage *sockAddr; socklen_t sockAddrLen; } /** - * Connect the OFTCPSocket to the specified destination. + * \brief Connect the OFTCPSocket to the specified destination. * * \param host The host to connect to * \param port The port on the host to connect to */ - (void)connectToHost: (OFString*)host port: (uint16_t)port; /** - * Bind the socket on the specified port and host. + * \brief Bind the socket on the specified port and host. * * \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. * \param host The host to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6 * to bind to all. @@ -61,39 +61,46 @@ */ - (uint16_t)bindToPort: (uint16_t)port onHost: (OFString*)host; /** - * Listen on the socket. + * \brief Listen on the socket. * * \param backlog Maximum length for the queue of pending connections. */ - (void)listenWithBackLog: (int)backLog; /** - * Listen on the socket. + * \brief Listen on the socket. */ - (void)listen; /** - * Accept an incoming connection. + * \brief Accept an incoming connection. + * * \return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; /** - * Enable or disable keep alives for the connection. + * \brief Enable or disable keep alives for the connection. + * + * \param enable Whether to enable or disable keep alives for the connection */ - (void)setKeepAlivesEnabled: (BOOL)enable; /** - * Returns the remote address of the socket. Only works with accepted sockets! + * \brief Returns the remote address of the socket. + * + * Only works with accepted sockets! * * \return The remote address as a string */ - (OFString*)remoteAddress; /** + * \brief Returns whether the socket is a listening socket. + * * \return Whether the socket is a listening socket */ - (BOOL)isListening; @end