@@ -70,11 +70,11 @@ [self doesNotRecognizeSelector: _cmd]; abort(); } _socket = INVALID_SOCKET; - _blocking = true; + _canBlock = true; } @catch (id e) { [self release]; @throw e; } @@ -106,43 +106,43 @@ - (id)copy { return [self retain]; } -- (bool)isBlocking +- (bool)canBlock { - return _blocking; + return _canBlock; } -- (void)setBlocking: (bool)enable +- (void)setCanBlock: (bool)canBlock { #if defined(HAVE_FCNTL) int flags = fcntl(_socket, F_GETFL, 0); if (flags == -1) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: errno]; - if (enable) + if (canBlock) flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK; if (fcntl(_socket, F_SETFL, flags) == -1) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: errno]; - _blocking = enable; + _canBlock = canBlock; #elif defined(OF_WINDOWS) - u_long v = enable; + u_long v = canBlock; if (ioctlsocket(_socket, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; - _blocking = enable; + _canBlock = canBlock; #else OF_UNRECOGNIZED_SELECTOR #endif }