@@ -36,11 +36,11 @@ @class OFTCPSocket; @class OFString; #ifdef OF_HAVE_BLOCKS typedef void (^of_tcpsocket_async_connect_block_t)(OFTCPSocket*, OFException*); -typedef BOOL (^of_tcpsocket_async_accept_block_t)(OFTCPSocket*, OFTCPSocket*, +typedef bool (^of_tcpsocket_async_accept_block_t)(OFTCPSocket*, OFTCPSocket*, OFException*); #endif /*! * @brief A class which provides functions to create and use TCP sockets. @@ -48,19 +48,19 @@ * To connect to a server, create a socket and connect it. * To create a server, create a socket, bind it and listen on it. */ @interface OFTCPSocket: OFStreamSocket { - BOOL _listening; + bool _listening; struct sockaddr_storage *_sockAddr; socklen_t _sockAddrLen; OFString *_SOCKS5Host; uint16_t _SOCKS5Port; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, getter=isListening) BOOL listening; +@property (readonly, getter=isListening) bool listening; @property (copy) OFString *SOCKS5Host; @property uint16_t SOCKS5Port; #endif /*! @@ -198,11 +198,11 @@ * @param target The target on which to execute the selector when a new * connection has been accepted. The method returns whether the * next incoming connection should be accepted by the specified * block as well. * @param selector The selector to call on the target. The signature must be - * BOOL (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, + * bool (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, * OFException *exception). */ - (void)asyncAcceptWithTarget: (id)target selector: (SEL)selector; @@ -220,11 +220,11 @@ /*! * @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; +- (void)setKeepAlivesEnabled: (bool)enable; /*! * @brief Returns the remote address of the socket. * * Only works with accepted sockets! @@ -236,15 +236,15 @@ /*! * @brief Returns whether the socket is a listening socket. * * @return Whether the socket is a listening socket */ -- (BOOL)isListening; +- (bool)isListening; @end #ifdef __cplusplus extern "C" { #endif extern Class of_tls_socket_class; #ifdef __cplusplus } #endif