@@ -213,11 +213,11 @@ _exception = [[e retain] autorelease]; } [self performSelector: @selector(didConnect) onThread: _sourceThread - waitUntilDone: NO]; + waitUntilDone: false]; objc_autoreleasePoolPop(pool); return nil; } @@ -279,16 +279,16 @@ [super dealloc]; } - (void)setSOCKS5Host: (OFString*)SOCKS5Host { - OF_SETTER(_SOCKS5Host, SOCKS5Host, YES, 1) + OF_SETTER(_SOCKS5Host, SOCKS5Host, true, 1) } - (OFString*)SOCKS5Host { - OF_GETTER(_SOCKS5Host, YES) + OF_GETTER(_SOCKS5Host, true) } - (void)setSOCKS5Port: (uint16_t)SOCKS5Port { _SOCKS5Port = SOCKS5Port; @@ -347,11 +347,11 @@ break; } freeaddrinfo(res0); #else - BOOL connected = NO; + bool connected = false; struct hostent *he; struct sockaddr_in addr; char **ip; # ifdef OF_HAVE_THREADS OFDataArray *addrlist; @@ -411,11 +411,11 @@ if (connect(_socket, (struct sockaddr*)&addr, sizeof(addr)) == -1) continue; - connected = YES; + connected = true; break; } # ifdef OF_HAVE_THREADS [addrlist release]; @@ -633,11 +633,11 @@ if (listen(_socket, backLog) == -1) @throw [OFListenFailedException exceptionWithClass: [self class] socket: self backLog: backLog]; - _listening = YES; + _listening = true; } - (void)listen { [self listenWithBackLog: SOMAXCONN]; @@ -680,11 +680,11 @@ [OFRunLoop OF_addAsyncAcceptForTCPSocket: self block: block]; } #endif -- (void)setKeepAlivesEnabled: (BOOL)enable +- (void)setKeepAlivesEnabled: (bool)enable { int v = enable; if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v))) @throw [OFSetOptionFailedException @@ -738,20 +738,20 @@ /* Get rid of a warning, never reached anyway */ assert(0); } -- (BOOL)isListening +- (bool)isListening { return _listening; } - (void)close { [super close]; - _listening = NO; + _listening = false; [self freeMemory: _sockAddr]; _sockAddr = NULL; _sockAddrLen = 0; } @end