@@ -67,11 +67,11 @@ [self doesNotRecognizeSelector: _cmd]; abort(); } _socket = INVALID_SOCKET; - _blocking = true; + _canBlock = true; } @catch (id e) { [self release]; @throw e; } @@ -89,64 +89,64 @@ - (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 } -- (void)setBroadcastAllowed: (bool)allowed +- (void)setCanSendToBroadcastAddresses: (bool)canSendToBroadcastAddresses { - int v = allowed; + int v = canSendToBroadcastAddresses; if (setsockopt(_socket, SOL_SOCKET, SO_BROADCAST, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; #ifdef OF_WII - _broadcastAllowed = allowed; + _canSendToBroadcastAddresses = allowed; #endif } -- (bool)isBroadcastAllowed +- (bool)canSendToBroadcastAddresses { #ifndef OF_WII int v; socklen_t len = sizeof(v); @@ -156,11 +156,11 @@ exceptionWithObject: self errNo: of_socket_errno()]; return v; #else - return _broadcastAllowed; + return _canSendToBroadcastAddresses; #endif } - (size_t)receiveIntoBuffer: (void *)buffer length: (size_t)length