Index: src/OFDNSResolver.m ================================================================== --- src/OFDNSResolver.m +++ src/OFDNSResolver.m @@ -760,11 +760,11 @@ of_socket_address_parse_ip(@"::", 0); _IPv6Socket = [[OFUDPSocket alloc] init]; [_IPv6Socket of_bindToAddress: &address extraType: SOCK_DNS]; - _IPv6Socket.blocking = false; + _IPv6Socket.canBlock = false; _IPv6Socket.delegate = self; } sock = _IPv6Socket; break; @@ -775,11 +775,11 @@ of_socket_address_parse_ip(@"0.0.0.0", 0); _IPv4Socket = [[OFUDPSocket alloc] init]; [_IPv4Socket of_bindToAddress: &address extraType: SOCK_DNS]; - _IPv4Socket.blocking = false; + _IPv4Socket.canBlock = false; _IPv4Socket.delegate = self; } sock = _IPv4Socket; break; Index: src/OFDatagramSocket.h ================================================================== --- src/OFDatagramSocket.h +++ src/OFDatagramSocket.h @@ -110,29 +110,29 @@ */ @interface OFDatagramSocket: OFObject { of_socket_t _socket; - bool _blocking; + bool _canBlock; #ifdef OF_WII - bool _broadcastAllowed; + bool _canSendToBroadcastAddresses; #endif id _Nullable _delegate; OF_RESERVE_IVARS(4) } /*! - * @brief Whether the socket is in blocking mode. + * @brief Whether the socket can block. * - * By default, a socket is in blocking mode. + * By default, a socket can block. */ -@property (nonatomic, getter=isBlocking) bool blocking; +@property (nonatomic) bool canBlock; /*! - * @brief Whether the socket is allowed to send to broadcast addresses. + * @brief Whether the socket can send to broadcast addresses. */ -@property (nonatomic, getter=isBroadcastAllowed) bool broadcastAllowed; +@property (nonatomic) bool canSendToBroadcastAddresses; /*! * @brief The delegate for asynchronous operations on the socket. * * @note The delegate is retained for as long as asynchronous operations are Index: src/OFDatagramSocket.m ================================================================== --- src/OFDatagramSocket.m +++ src/OFDatagramSocket.m @@ -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 Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -145,11 +145,11 @@ { #ifdef OF_HTTPCLIENT_M @public #endif OFObject *_Nullable _delegate; - bool _insecureRedirectsAllowed, _inProgress; + bool _allowsInsecureRedirects, _inProgress; OFTCPSocket *_Nullable _socket; OFURL *_Nullable _lastURL; bool _lastWasHEAD; OFHTTPResponse *_Nullable _lastResponse; } @@ -159,13 +159,13 @@ */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) OFObject *delegate; /*! - * @brief Whether redirects from HTTPS to HTTP will be allowed. + * @brief Whether the HTTP client allows redirects from HTTPS to HTTP. */ -@property (nonatomic) bool insecureRedirectsAllowed; +@property (nonatomic) bool allowsInsecureRedirects; /*! * @brief Creates a new OFHTTPClient. * * @return A new, autoreleased OFHTTPClient Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -351,11 +351,11 @@ OF_ORDERED_SAME && [newURLScheme caseInsensitiveCompare: @"https"] != OF_ORDERED_SAME) follow = false; - if (!_client->_insecureRedirectsAllowed && + if (!_client->_allowsInsecureRedirects && [URL.scheme caseInsensitiveCompare: @"https"] == OF_ORDERED_SAME && [newURLScheme caseInsensitiveCompare: @"http"] == OF_ORDERED_SAME) follow = false; @@ -1198,11 +1198,11 @@ } @end @implementation OFHTTPClient @synthesize delegate = _delegate; -@synthesize insecureRedirectsAllowed = _insecureRedirectsAllowed; +@synthesize allowsInsecureRedirects = _allowsInsecureRedirects; + (instancetype)client { return [[[self alloc] init] autorelease]; } Index: src/OFIPSocketAsyncConnector.m ================================================================== --- src/OFIPSocketAsyncConnector.m +++ src/OFIPSocketAsyncConnector.m @@ -67,11 +67,11 @@ } - (void)didConnect { if (_exception == nil) - [_socket setBlocking: true]; + [_socket setCanBlock: true]; #ifdef OF_HAVE_BLOCKS if (_block != NULL) { if ([_socket isKindOfClass: [OFTCPSocket class]]) ((of_tcp_socket_async_connect_block_t)_block)( @@ -178,13 +178,13 @@ * * So for now, connecting is blocking on Wii and 3DS. * * FIXME: Use a different thread as a work around. */ - [_socket setBlocking: true]; + [_socket setCanBlock: true]; #else - [_socket setBlocking: false]; + [_socket setCanBlock: false]; #endif if (![_socket of_connectSocketToAddress: &address errNo: &errNo]) { #if !defined(OF_NINTENDO_3DS) && !defined(OF_WII) @@ -213,11 +213,11 @@ } #endif } #if defined(OF_NINTENDO_3DS) || defined(OF_WII) - [_socket setBlocking: false]; + [_socket setCanBlock: false]; #endif [self didConnect]; } Index: src/OFIPXSocket.m ================================================================== --- src/OFIPXSocket.m +++ src/OFIPXSocket.m @@ -61,11 +61,11 @@ exceptionWithPort: port packetType: packetType socket: self errNo: of_socket_errno()]; - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL_H) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif Index: src/OFSCTPSocket.h ================================================================== --- src/OFSCTPSocket.h +++ src/OFSCTPSocket.h @@ -72,13 +72,14 @@ { OF_RESERVE_IVARS(4) } /*! - * @brief Whether SCTP_NODELAY is enabled for the connection + * @brief Whether sending packets can be delayed. Setting this to NO sets + * SCTP_NODELAY on the socket. */ -@property (nonatomic, getter=isNoDelayEnabled) bool noDelayEnabled; +@property (nonatomic) bool canDelaySendingPackets; /*! * @brief The delegate for asynchronous operations on the socket. * * @note The delegate is retained for as long as asynchronous operations are Index: src/OFSCTPSocket.m ================================================================== --- src/OFSCTPSocket.m +++ src/OFSCTPSocket.m @@ -243,11 +243,11 @@ exceptionWithHost: host port: port socket: self errNo: of_socket_errno()]; - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif @@ -303,22 +303,22 @@ socket: self errNo: EAFNOSUPPORT]; } } -- (void)setNoDelayEnabled: (bool)enabled +- (void)setCanDelaySendingPackets: (bool)canDelaySendingPackets { - int v = enabled; + int v = !canDelaySendingPackets; if (setsockopt(_socket, IPPROTO_SCTP, SCTP_NODELAY, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; } -- (bool)isNoDelayEnabled +- (bool)canDelaySendingPackets { int v; socklen_t len = sizeof(v); if (getsockopt(_socket, IPPROTO_SCTP, SCTP_NODELAY, @@ -325,8 +325,8 @@ (char *)&v, &len) != 0 || len != sizeof(v)) @throw [OFGetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; - return v; + return !v; } @end Index: src/OFSPXSocket.m ================================================================== --- src/OFSPXSocket.m +++ src/OFSPXSocket.m @@ -115,11 +115,11 @@ errNo: &errNo]) { exception = [self of_connectionFailedExceptionForErrNo: errNo]; goto inform_delegate; } - _socket.blocking = false; + _socket.canBlock = false; if (![_socket of_connectSocketToAddress: &address errNo: &errNo]) { if (errNo == EINPROGRESS) { [OFRunLoop of_addAsyncConnectForSocket: _socket @@ -144,11 +144,11 @@ exception: (id)exception { id delegate = ((OFSPXSocket *)sock).delegate; if (exception == nil) - ((OFSPXSocket *)sock).blocking = true; + ((OFSPXSocket *)sock).canBlock = true; #ifdef OF_HAVE_BLOCKS if (_block != NULL) _block(exception); else { @@ -335,11 +335,11 @@ exceptionWithPort: port packetType: SPX_PACKET_TYPE socket: self errNo: of_socket_errno()]; - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL_H) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif Index: src/OFSPXStreamSocket.m ================================================================== --- src/OFSPXStreamSocket.m +++ src/OFSPXStreamSocket.m @@ -118,11 +118,11 @@ errNo: &errNo]) { exception = [self of_connectionFailedExceptionForErrNo: errNo]; goto inform_delegate; } - _socket.blocking = false; + _socket.canBlock = false; if (![_socket of_connectSocketToAddress: &address errNo: &errNo]) { if (errNo == EINPROGRESS) { [OFRunLoop of_addAsyncConnectForSocket: _socket @@ -148,11 +148,11 @@ { id delegate = ((OFSPXStreamSocket *)sock).delegate; if (exception == nil) - ((OFSPXStreamSocket *)sock).blocking = true; + ((OFSPXStreamSocket *)sock).canBlock = true; #ifdef OF_HAVE_BLOCKS if (_block != NULL) _block(exception); else { @@ -339,11 +339,11 @@ exceptionWithPort: port packetType: SPX_PACKET_TYPE socket: self errNo: of_socket_errno()]; - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL_H) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif Index: src/OFSequencedPacketSocket.h ================================================================== --- src/OFSequencedPacketSocket.h +++ src/OFSequencedPacketSocket.h @@ -128,22 +128,22 @@ */ @interface OFSequencedPacketSocket: OFObject { of_socket_t _socket; - bool _blocking, _listening; + bool _canBlock, _listening; of_socket_address_t _remoteAddress; id _Nullable _delegate; OF_RESERVE_IVARS(4) } /*! - * @brief Whether the socket is in blocking mode. + * @brief Whether the socket can block. * - * By default, a socket is in blocking mode. + * By default, a socket can block. */ -@property (nonatomic, getter=isBlocking) bool blocking; +@property (nonatomic) bool canBlock; /*! * @brief Whether the socket is a listening socket. */ @property (readonly, nonatomic, getter=isListening) bool listening; Index: src/OFSequencedPacketSocket.m ================================================================== --- src/OFSequencedPacketSocket.m +++ src/OFSequencedPacketSocket.m @@ -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 } Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -188,19 +188,19 @@ * override these methods without the `lowlevel` prefix, you *will* break * caching and get broken results! */ @interface OFStream: OFObject { - bool _blocking; + bool _canBlock; id _Nullable _delegate; #ifndef OF_SEEKABLE_STREAM_M @private #endif char *_Nullable _readBuffer, *_Nullable _readBufferMemory; char *_Nullable _writeBuffer; size_t _readBufferLength, _writeBufferLength; - bool _writeBuffered, _waitingForDelimiter; + bool _buffersWrites, _waitingForDelimiter; OF_RESERVE_IVARS(4) } /*! * @brief Whether the end of the stream has been reached. @@ -208,24 +208,24 @@ @property (readonly, nonatomic, getter=isAtEndOfStream) bool atEndOfStream; /*! * @brief Whether writes are buffered. */ -@property (nonatomic, nonatomic, getter=isWriteBuffered) bool writeBuffered; +@property (nonatomic, nonatomic) bool buffersWrites; /*! * @brief Whether data is present in the internal read buffer. */ @property (readonly, nonatomic) bool hasDataInReadBuffer; /*! - * @brief Whether the stream is in blocking mode. + * @brief Whether the stream can block. * - * By default, a stream is in blocking mode. + * By default, a stream can block. * On Win32, setting this currently only works for sockets! */ -@property (nonatomic, getter=isBlocking) bool blocking; +@property (nonatomic) bool canBlock; /*! * @brief The delegate for asynchronous operations on the stream. * * @note The delegate is retained for as long as asynchronous operations are Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -61,10 +61,11 @@ #import "of_asprintf.h" #define MIN_READ_SIZE 512 @implementation OFStream +@synthesize buffersWrites = _buffersWrites; @synthesize of_waitingForDelimiter = _waitingForDelimiter, delegate = _delegate; #if defined(SIGPIPE) && defined(SIG_IGN) + (void)initialize { @@ -81,11 +82,11 @@ if (self.class == [OFStream class]) { [self doesNotRecognizeSelector: _cmd]; abort(); } - _blocking = true; + _canBlock = true; } @catch (id e) { [self release]; @throw e; } @@ -1126,20 +1127,10 @@ { return [self tryReadTillDelimiter: delimiter encoding: OF_STRING_ENCODING_UTF_8]; } -- (bool)isWriteBuffered -{ - return _writeBuffered; -} - -- (void)setWriteBuffered: (bool)enable -{ - _writeBuffered = enable; -} - - (void)flushWriteBuffer { if (_writeBuffer == NULL) return; @@ -1152,15 +1143,15 @@ } - (size_t)writeBuffer: (const void *)buffer length: (size_t)length { - if (!_writeBuffered) { + if (!_buffersWrites) { size_t bytesWritten = [self lowlevelWriteBuffer: buffer length: length]; - if (_blocking && bytesWritten < length) + if (_canBlock && bytesWritten < length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length bytesWritten: bytesWritten errNo: 0]; @@ -1798,16 +1789,16 @@ - (bool)hasDataInReadBuffer { return (_readBufferLength > 0); } -- (bool)isBlocking +- (bool)canBlock { - return _blocking; + return _canBlock; } -- (void)setBlocking: (bool)enable +- (void)setCanBlock: (bool)canBlock { #if defined(HAVE_FCNTL) && !defined(OF_AMIGAOS) bool readImplemented = false, writeImplemented = false; @try { @@ -1821,11 +1812,11 @@ if (readFlags == -1) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: errno]; - if (enable) + if (canBlock) readFlags &= ~O_NONBLOCK; else readFlags |= O_NONBLOCK; if (fcntl(((id )self) @@ -1847,11 +1838,11 @@ if (writeFlags == -1) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: errno]; - if (enable) + if (canBlock) writeFlags &= ~O_NONBLOCK; else writeFlags |= O_NONBLOCK; if (fcntl(((id )self) @@ -1864,11 +1855,11 @@ if (!readImplemented && !writeImplemented) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; - _blocking = enable; + _canBlock = canBlock; #else OF_UNRECOGNIZED_SELECTOR #endif } @@ -1914,10 +1905,10 @@ _readBufferLength = 0; [self freeMemory: _writeBuffer]; _writeBuffer = NULL; _writeBufferLength = 0; - _writeBuffered = false; + _buffersWrites = false; _waitingForDelimiter = false; } @end Index: src/OFStreamSocket.m ================================================================== --- src/OFStreamSocket.m +++ src/OFStreamSocket.m @@ -160,24 +160,24 @@ return (size_t)bytesWritten; } #if defined(OF_WINDOWS) || defined(OF_AMIGAOS) -- (void)setBlocking: (bool)enable +- (void)setCanBlock: (bool)canBlock { # ifdef OF_WINDOWS - u_long v = enable; + u_long v = canBlock; # else - char v = enable; + char v = canBlock; # endif if (ioctlsocket(_socket, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; - _blocking = enable; + _canBlock = canBlock; } #endif - (int)fileDescriptorForReading { Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -82,24 +82,25 @@ @property (class, nonatomic) uint16_t SOCKS5Port; #endif #if !defined(OF_WII) && !defined(OF_NINTENDO_3DS) /*! - * @brief Whether keep alives are enabled for the connection. + * @brief Whether the socket sends keep alives for the connection. * * @warning This is not available on the Wii or Nintendo 3DS! */ -@property (nonatomic, getter=isKeepAliveEnabled) bool keepAliveEnabled; +@property (nonatomic) bool sendsKeepAlives; #endif #ifndef OF_WII /*! - * @brief Whether TCP_NODELAY is enabled for the connection + * @brief Whether sending segments can be delayed. Setting this to NO sets + * TCP_NODELAY on the socket. * * @warning This is not available on the Wii! */ -@property (nonatomic, getter=isNoDelayEnabled) bool noDelayEnabled; +@property (nonatomic) bool canDelaySendingSegments; #endif /*! * @brief The host to use as a SOCKS5 proxy. */ Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -330,11 +330,11 @@ exceptionWithHost: host port: port socket: self errNo: of_socket_errno()]; - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif @@ -436,22 +436,22 @@ errNo: EADDRNOTAVAIL]; #endif } #if !defined(OF_WII) && !defined(OF_NINTENDO_3DS) -- (void)setKeepAliveEnabled: (bool)enabled +- (void)setSendsKeepAlives: (bool)sendsKeepAlives { - int v = enabled; + int v = sendsKeepAlives; if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; } -- (bool)isKeepAliveEnabled +- (bool)sendsKeepAlives { int v; socklen_t len = sizeof(v); if (getsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, @@ -463,22 +463,22 @@ return v; } #endif #ifndef OF_WII -- (void)setNoDelayEnabled: (bool)enabled +- (void)setCanDelaySendingSegments: (bool)canDelaySendingSegments { - int v = enabled; + int v = !canDelaySendingSegments; if (setsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; } -- (bool)isNoDelayEnabled +- (bool)canDelaySendingSegments { int v; socklen_t len = sizeof(v); if (getsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, @@ -485,11 +485,11 @@ (char *)&v, &len) != 0 || len != sizeof(v)) @throw [OFGetOptionFailedException exceptionWithObject: self errNo: of_socket_errno()]; - return v; + return !v; } #endif - (void)close { Index: src/OFTCPSocketSOCKS5Connector.m ================================================================== --- src/OFTCPSocketSOCKS5Connector.m +++ src/OFTCPSocketSOCKS5Connector.m @@ -73,13 +73,10 @@ [super dealloc]; } - (void)didConnect { - if (_exception == nil) - _socket.blocking = true; - _socket.delegate = _delegate; #ifdef OF_HAVE_BLOCKS if (_block != NULL) _block(_exception); Index: src/OFTLSSocket.h ================================================================== --- src/OFTLSSocket.h +++ src/OFTLSSocket.h @@ -79,16 +79,15 @@ */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) const char *privateKeyPassphrase; /*! - * @brief Whether certificate verification is enabled. + * @brief Whether certificates are verified. * * The default is enabled. */ -@property (nonatomic, getter=isCertificateVerificationEnabled) - bool certificateVerificationEnabled; +@property (nonatomic) bool verifiesCertificates; /*! * @brief Initializes the TLS socket with the specified TCP socket as its * underlying socket. * Index: src/OFTarArchive.m ================================================================== --- src/OFTarArchive.m +++ src/OFTarArchive.m @@ -496,19 +496,19 @@ @throw [OFTruncatedDataException exception]; remainder = 512 - _entry.size % 512; if (remainder != 512) { - bool wasWriteBuffered = _stream.writeBuffered; + bool didBufferWrites = _stream.buffersWrites; - [_stream setWriteBuffered: true]; + _stream.buffersWrites = true; while (remainder--) [_stream writeInt8: 0]; [_stream flushWriteBuffer]; - _stream.writeBuffered = wasWriteBuffered; + _stream.buffersWrites = didBufferWrites; } [_stream release]; _stream = nil; Index: src/OFUDPSocket.m ================================================================== --- src/OFUDPSocket.m +++ src/OFUDPSocket.m @@ -56,11 +56,11 @@ port: port socket: self errNo: of_socket_errno()]; } - _blocking = true; + _canBlock = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) /* {} needed to avoid warning with Clang 10 if next #if is false. */ if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) { fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -556,11 +556,11 @@ @"prog", [OFApplication programName])]; [OFApplication terminateWithStatus: 1]; } if (_insecure) - _HTTPClient.insecureRedirectsAllowed = true; + _HTTPClient.allowsInsecureRedirects = true; [self performSelector: @selector(downloadNextURL) afterDelay: 0]; } @@ -567,12 +567,12 @@ - (void)client: (OFHTTPClient *)client didCreateSocket: (OFTCPSocket *)sock request: (OFHTTPRequest *)request { if (_insecure && [sock respondsToSelector: - @selector(setCertificateVerificationEnabled:)]) - ((id )sock).certificateVerificationEnabled = false; + @selector(setVerifiesCertificates:)]) + ((id )sock).verifiesCertificates = false; } - (void)client: (OFHTTPClient *)client wantsRequestBody: (OFStream *)body request: (OFHTTPRequest *)request