Index: .travis.yml ================================================================== --- .travis.yml +++ .travis.yml @@ -250,12 +250,10 @@ *) pkgs="gobjc"; ;; esac; - pkgs="$pkgs libsctp-dev"; - if grep precise /etc/lsb-release >/dev/null; then pkgs="$pkgs ipx"; fi; if ! sudo apt-get -qq install -y $pkgs >/tmp/apt_log 2>&1; then Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -1302,16 +1302,10 @@ ]) AC_CHECK_HEADER(netinet/tcp.h, [ AC_DEFINE(OF_HAVE_NETINET_TCP_H, 1, [Whether we have netinet/tcp.h]) ]) - AC_CHECK_HEADER(netinet/sctp.h, [ - AC_DEFINE(OF_HAVE_SCTP, 1, [Whether we have SCTP]) - AC_DEFINE(OF_HAVE_NETINET_SCTP_H, 1, - [Whether we have netinet/sctp.h]) - AC_SUBST(USE_SRCS_SCTP, '${SRCS_SCTP}') - ]) AC_CHECK_HEADERS([arpa/inet.h netdb.h]) AC_CHECK_HEADER(netipx/ipx.h, [ AC_DEFINE(OF_HAVE_NETIPX_IPX_H, 1, [Whether we have netipx/ipx.h]) ]) Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -61,11 +61,10 @@ OF_EPOLL_KERNEL_EVENT_OBSERVER_M = @OF_EPOLL_KERNEL_EVENT_OBSERVER_M@ OF_HTTP_CLIENT_TESTS_M = @OF_HTTP_CLIENT_TESTS_M@ OF_KQUEUE_KERNEL_EVENT_OBSERVER_M = @OF_KQUEUE_KERNEL_EVENT_OBSERVER_M@ OF_POLL_KERNEL_EVENT_OBSERVER_M = @OF_POLL_KERNEL_EVENT_OBSERVER_M@ OF_PROCESS_M = @OF_PROCESS_M@ -OF_SCTP_SOCKET_M = @OF_SCTP_SOCKET_M@ OF_SELECT_KERNEL_EVENT_OBSERVER_M = @OF_SELECT_KERNEL_EVENT_OBSERVER_M@ REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@ RUNTIME = @RUNTIME@ RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@ @@ -81,10 +80,9 @@ UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_FILES = @USE_SRCS_FILES@ USE_SRCS_IPX = @USE_SRCS_IPX@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ -USE_SRCS_SCTP = @USE_SRCS_SCTP@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ USE_SRCS_WINDOWS = @USE_SRCS_WINDOWS@ WRAPPER = @WRAPPER@ Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -123,11 +123,10 @@ OFString+PathAdditions.m SRCS_IPX = OFIPXSocket.m \ OFSPXSocket.m \ OFSPXStreamSocket.m SRCS_PLUGINS = OFPlugin.m -SRCS_SCTP = OFSCTPSocket.m SRCS_SOCKETS = OFDNSQuery.m \ OFDNSResolver.m \ OFDNSResourceRecord.m \ OFDNSResponse.m \ OFDatagramSocket.m \ @@ -140,12 +139,11 @@ OFSequencedPacketSocket.m \ OFStreamSocket.m \ OFTCPSocket.m \ OFUDPSocket.m \ socket.m \ - ${USE_SRCS_IPX} \ - ${USE_SRCS_SCTP} + ${USE_SRCS_IPX} SRCS_THREADS = OFCondition.m \ OFMutex.m \ OFRecursiveMutex.m \ condition.m \ mutex.m \ Index: src/OFIPSocketAsyncConnector.m ================================================================== --- src/OFIPSocketAsyncConnector.m +++ src/OFIPSocketAsyncConnector.m @@ -19,13 +19,10 @@ #include #import "OFIPSocketAsyncConnector.h" #import "OFData.h" -#ifdef OF_HAVE_SCTP -# import "OFSCTPSocket.h" -#endif #import "OFTCPSocket.h" #import "OFThread.h" #import "OFTimer.h" #import "OFConnectionFailedException.h" @@ -74,15 +71,10 @@ #ifdef OF_HAVE_BLOCKS if (_block != NULL) { if ([_socket isKindOfClass: [OFTCPSocket class]]) ((of_tcp_socket_async_connect_block_t)_block)( _exception); -# ifdef OF_HAVE_SCTP - else if ([_socket isKindOfClass: [OFSCTPSocket class]]) - ((of_sctp_socket_async_connect_block_t)_block)( - _exception); -# endif else OF_ENSURE(0); } else { #endif if ([_delegate respondsToSelector: DELETED src/OFSCTPSocket.h Index: src/OFSCTPSocket.h ================================================================== --- src/OFSCTPSocket.h +++ src/OFSCTPSocket.h @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, - * 2018, 2019, 2020 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFSequencedPacketSocket.h" -#import "OFRunLoop.h" - -#import "socket.h" - -OF_ASSUME_NONNULL_BEGIN - -/*! @file */ - -@class OFSCTPSocket; -@class OFString; - -#ifdef OF_HAVE_BLOCKS -/*! - * @brief A block which is called when the socket connected. - * - * @param exception An exception which occurred while connecting the socket or - * `nil` on success - */ -typedef void (^of_sctp_socket_async_connect_block_t)(id _Nullable exception); -#endif - -/*! - * @protocol OFSCTPSocketDelegate OFSCTPSocket.h ObjFW/OFSCTPSocket.h - * - * A delegate for OFSCTPSocket. - */ -@protocol OFSCTPSocketDelegate -@optional -/*! - * @brief A method which is called when a socket connected. - * - * @param socket The socket which connected - * @param host The host connected to - * @param port The port on the host connected to - * @param exception An exception that occurred while connecting, or nil on - * success - */ -- (void)socket: (OFSCTPSocket *)socket - didConnectToHost: (OFString *)host - port: (uint16_t)port - exception: (nullable id)exception; -@end - -/*! - * @class OFSCTPSocket OFSCTPSocket.h ObjFW/OFSCTPSocket.h - * - * @brief A class which provides methods to create and use SCTP sockets in - * one-to-one mode. - * - * 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 OFSCTPSocket: OFSequencedPacketSocket -{ - OF_RESERVE_IVARS(4) -} - -/*! - * @brief Whether sending packets can be delayed. Setting this to NO sets - * SCTP_NODELAY on the socket. - */ -@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 - * still ongoing. - */ -@property OF_NULLABLE_PROPERTY (assign, nonatomic) - id delegate; - -/*! - * @brief Connect the OFSCTPSocket to the specified destination. - * - * @param host The host to connect to - * @param port The port on the host to connect to - */ -- (void)connectToHost: (OFString *)host - port: (uint16_t)port; - -/*! - * @brief Asynchronously connect the OFSCTPSocket to the specified destination. - * - * @param host The host to connect to - * @param port The port on the host to connect to - */ -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port; - -/*! - * @brief Asynchronously connect the OFSCTPSocket to the specified destination. - * - * @param host The host to connect to - * @param port The port on the host to connect to - * @param runLoopMode The run loop mode in which to perform the async connect - */ -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - runLoopMode: (of_run_loop_mode_t)runLoopMode; - -#ifdef OF_HAVE_BLOCKS -/*! - * @brief Asynchronously connect the OFSCTPSocket to the specified destination. - * - * @param host The host to connect to - * @param port The port on the host to connect to - * @param block The block to execute once the connection has been established - */ -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - block: (of_sctp_socket_async_connect_block_t)block; - -/*! - * @brief Asynchronously connect the OFSCTPSocket to the specified destination. - * - * @param host The host to connect to - * @param port The port on the host to connect to - * @param runLoopMode The run loop mode in which to perform the async connect - * @param block The block to execute once the connection has been established - */ -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - runLoopMode: (of_run_loop_mode_t)runLoopMode - block: (of_sctp_socket_async_connect_block_t)block; -#endif - -/*! - * @brief Bind the socket to the specified host and port. - * - * @param host The host to bind to. Use `@"0.0.0.0"` for IPv4 or `@"::"` for - * IPv6 to bind to all. - * @param port The port to bind to. If the port is 0, an unused port will be - * chosen, which can be obtained using the return value. - * @return The port the socket was bound to - */ -- (uint16_t)bindToHost: (OFString *)host - port: (uint16_t)port; -@end - -OF_ASSUME_NONNULL_END DELETED src/OFSCTPSocket.m Index: src/OFSCTPSocket.m ================================================================== --- src/OFSCTPSocket.m +++ src/OFSCTPSocket.m @@ -1,332 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, - * 2018, 2019, 2020 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include -#include -#include -#include - -#ifdef HAVE_FCNTL_H -# include -#endif - -#import "OFSCTPSocket.h" -#import "OFDNSResolver.h" -#import "OFData.h" -#import "OFDate.h" -#import "OFIPSocketAsyncConnector.h" -#import "OFRunLoop.h" -#import "OFRunLoop+Private.h" -#import "OFString.h" -#import "OFThread.h" - -#import "OFAlreadyConnectedException.h" -#import "OFBindFailedException.h" -#import "OFGetOptionFailedException.h" -#import "OFNotOpenException.h" -#import "OFSetOptionFailedException.h" - -#import "socket.h" -#import "socket_helpers.h" - -static const of_run_loop_mode_t connectRunLoopMode = - @"of_sctp_socket_connect_mode"; - -@interface OFSCTPSocket () -@end - -@interface OFSCTPSocketConnectDelegate: OFObject -{ -@public - bool _done; - id _exception; -} -@end - -@implementation OFSCTPSocketConnectDelegate -- (void)dealloc -{ - [_exception release]; - - [super dealloc]; -} - -- (void)socket: (OFSCTPSocket *)sock - didConnectToHost: (OFString *)host - port: (uint16_t)port - exception: (id)exception -{ - _done = true; - _exception = [exception retain]; -} -@end - -@implementation OFSCTPSocket -@dynamic delegate; - -- (bool)of_createSocketForAddress: (const of_socket_address_t *)address - errNo: (int *)errNo -{ -#if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) - int flags; -#endif - - if (_socket != INVALID_SOCKET) - @throw [OFAlreadyConnectedException exceptionWithSocket: self]; - - if ((_socket = socket(address->sockaddr.sockaddr.sa_family, - SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_SCTP)) == INVALID_SOCKET) { - *errNo = of_socket_errno(); - return false; - } - -#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 - - return true; -} - -- (bool)of_connectSocketToAddress: (const of_socket_address_t *)address - errNo: (int *)errNo -{ - if (_socket == INVALID_SOCKET) - @throw [OFNotOpenException exceptionWithObject: self]; - - if (connect(_socket, &address->sockaddr.sockaddr, - address->length) != 0) { - *errNo = of_socket_errno(); - return false; - } - - return true; -} - -- (void)of_closeSocket -{ - closesocket(_socket); - _socket = INVALID_SOCKET; -} - -- (void)connectToHost: (OFString *)host - port: (uint16_t)port -{ - void *pool = objc_autoreleasePoolPush(); - id delegate = _delegate; - OFSCTPSocketConnectDelegate *connectDelegate = - [[[OFSCTPSocketConnectDelegate alloc] init] autorelease]; - OFRunLoop *runLoop = [OFRunLoop currentRunLoop]; - - self.delegate = connectDelegate; - [self asyncConnectToHost: host - port: port - runLoopMode: connectRunLoopMode]; - - while (!connectDelegate->_done) - [runLoop runMode: connectRunLoopMode - beforeDate: nil]; - - /* Cleanup */ - [runLoop runMode: connectRunLoopMode - beforeDate: [OFDate date]]; - - if (connectDelegate->_exception != nil) - @throw connectDelegate->_exception; - - self.delegate = delegate; - - objc_autoreleasePoolPop(pool); -} - -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port -{ - [self asyncConnectToHost: host - port: port - runLoopMode: of_run_loop_mode_default]; -} - -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - runLoopMode: (of_run_loop_mode_t)runLoopMode -{ - void *pool = objc_autoreleasePoolPush(); - - if (_socket != INVALID_SOCKET) - @throw [OFAlreadyConnectedException exceptionWithSocket: self]; - - [[[[OFIPSocketAsyncConnector alloc] - initWithSocket: self - host: host - port: port - delegate: _delegate - block: NULL - ] autorelease] startWithRunLoopMode: runLoopMode]; - - objc_autoreleasePoolPop(pool); -} - -#ifdef OF_HAVE_BLOCKS -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - block: (of_sctp_socket_async_connect_block_t)block -{ - [self asyncConnectToHost: host - port: port - runLoopMode: of_run_loop_mode_default - block: block]; -} - -- (void)asyncConnectToHost: (OFString *)host - port: (uint16_t)port - runLoopMode: (of_run_loop_mode_t)runLoopMode - block: (of_sctp_socket_async_connect_block_t)block -{ - void *pool = objc_autoreleasePoolPush(); - - if (_socket != INVALID_SOCKET) - @throw [OFAlreadyConnectedException exceptionWithSocket: self]; - - [[[[OFIPSocketAsyncConnector alloc] - initWithSocket: self - host: host - port: port - delegate: nil - block: block] autorelease] - startWithRunLoopMode: runLoopMode]; - - objc_autoreleasePoolPop(pool); -} -#endif - -- (uint16_t)bindToHost: (OFString *)host - port: (uint16_t)port -{ - const int one = 1; - void *pool = objc_autoreleasePoolPush(); - OFData *socketAddresses; - of_socket_address_t address; -#if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) - int flags; -#endif - - if (_socket != INVALID_SOCKET) - @throw [OFAlreadyConnectedException exceptionWithSocket: self]; - - socketAddresses = [[OFThread DNSResolver] - resolveAddressesForHost: host - addressFamily: OF_SOCKET_ADDRESS_FAMILY_ANY]; - - address = *(of_socket_address_t *)[socketAddresses itemAtIndex: 0]; - of_socket_address_set_port(&address, port); - - if ((_socket = socket(address.sockaddr.sockaddr.sa_family, - SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_SCTP)) == INVALID_SOCKET) - @throw [OFBindFailedException - exceptionWithHost: host - port: port - socket: self - errNo: of_socket_errno()]; - - _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 - - setsockopt(_socket, SOL_SOCKET, SO_REUSEADDR, - (char *)&one, (socklen_t)sizeof(one)); - - if (bind(_socket, &address.sockaddr.sockaddr, address.length) != 0) { - int errNo = of_socket_errno(); - - closesocket(_socket); - _socket = INVALID_SOCKET; - - @throw [OFBindFailedException exceptionWithHost: host - port: port - socket: self - errNo: errNo]; - } - - objc_autoreleasePoolPop(pool); - - if (port > 0) - return port; - - memset(&address, 0, sizeof(address)); - - address.length = (socklen_t)sizeof(address.sockaddr); - if (of_getsockname(_socket, &address.sockaddr.sockaddr, - &address.length) != 0) { - int errNo = of_socket_errno(); - - closesocket(_socket); - _socket = INVALID_SOCKET; - - @throw [OFBindFailedException exceptionWithHost: host - port: port - socket: self - errNo: errNo]; - } - - if (address.sockaddr.sockaddr.sa_family == AF_INET) - return OF_BSWAP16_IF_LE(address.sockaddr.in.sin_port); -# ifdef OF_HAVE_IPV6 - else if (address.sockaddr.sockaddr.sa_family == AF_INET6) - return OF_BSWAP16_IF_LE(address.sockaddr.in6.sin6_port); -# endif - else { - closesocket(_socket); - _socket = INVALID_SOCKET; - - @throw [OFBindFailedException exceptionWithHost: host - port: port - socket: self - errNo: EAFNOSUPPORT]; - } -} - -- (void)setCanDelaySendingPackets: (bool)canDelaySendingPackets -{ - 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)canDelaySendingPackets -{ - int v; - socklen_t len = sizeof(v); - - if (getsockopt(_socket, IPPROTO_SCTP, SCTP_NODELAY, - (char *)&v, &len) != 0 || len != sizeof(v)) - @throw [OFGetOptionFailedException - exceptionWithObject: self - errNo: of_socket_errno()]; - - return !v; -} -@end Index: src/ObjFW.h ================================================================== --- src/ObjFW.h +++ src/ObjFW.h @@ -81,13 +81,10 @@ # ifdef OF_HAVE_IPX # import "OFIPXSocket.h" # import "OFSPXSocket.h" # import "OFSPXStreamSocket.h" # endif -# ifdef OF_HAVE_SCTP -# import "OFSCTPSocket.h" -# endif #endif #ifdef OF_HAVE_SOCKETS # ifdef OF_HAVE_THREADS # import "OFHTTPClient.h" # endif Index: src/objfw-defs.h.in ================================================================== --- src/objfw-defs.h.in +++ src/objfw-defs.h.in @@ -18,11 +18,10 @@ #undef OF_HAVE_IPX #undef OF_HAVE_LIMITS_H #undef OF_HAVE_LINK #undef OF_HAVE_MAX_ALIGN_T #undef OF_HAVE_NETINET_IN_H -#undef OF_HAVE_NETINET_SCTP_H #undef OF_HAVE_NETINET_TCP_H #undef OF_HAVE_NETIPX_IPX_H #undef OF_HAVE_OSATOMIC #undef OF_HAVE_OSATOMIC_64 #undef OF_HAVE_PIPE Index: src/socket.h ================================================================== --- src/socket.h +++ src/socket.h @@ -32,13 +32,10 @@ # include #endif #ifdef OF_HAVE_NETINET_TCP_H # include #endif -#ifdef OF_HAVE_NETINET_SCTP_H -# include -#endif #ifdef OF_HAVE_NETIPX_IPX_H # include #endif #include "platform.h" Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -54,21 +54,19 @@ OFSHA512HashTests.m SRCS_IPX = OFIPXSocketTests.m \ OFSPXSocketTests.m \ OFSPXStreamSocketTests.m SRCS_PLUGINS = OFPluginTests.m -SRCS_SCTP = OFSCTPSocketTests.m SRCS_SOCKETS = OFDNSResolverTests.m \ ${OF_HTTP_CLIENT_TESTS_M} \ OFHTTPCookieTests.m \ OFHTTPCookieManagerTests.m \ OFKernelEventObserverTests.m \ OFTCPSocketTests.m \ OFUDPSocketTests.m \ SocketTests.m \ - ${USE_SRCS_IPX} \ - ${USE_SRCS_SCTP} + ${USE_SRCS_IPX} SRCS_THREADS = OFThreadTests.m SRCS_WINDOWS = OFWindowsRegistryKeyTests.m IOS_USER ?= mobile IOS_TMP ?= /tmp/objfw-test DELETED tests/OFSCTPSocketTests.m Index: tests/OFSCTPSocketTests.m ================================================================== --- tests/OFSCTPSocketTests.m +++ tests/OFSCTPSocketTests.m @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, - * 2018, 2019, 2020 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include -#include - -#import "TestsAppDelegate.h" - -static OFString *module = @"OFSCTPSocket"; - -@implementation TestsAppDelegate (OFSCTPSocketTests) -- (void)SCTPSocketTests -{ - void *pool = objc_autoreleasePoolPush(); - OFSCTPSocket *server, *client = nil, *accepted; - uint16_t port; - char buf[6]; - - TEST(@"+[socket]", (server = [OFSCTPSocket socket]) && - (client = [OFSCTPSocket socket])) - - @try { - TEST(@"-[bindToHost:port:]", - (port = [server bindToHost: @"127.0.0.1" - port: 0])) - } @catch (OFBindFailedException *e) { - switch (e.errNo) { - case EPROTONOSUPPORT: - of_stdout.foregroundColor = [OFColor lime]; - [of_stdout writeLine: - @"[OFSCTPSocket] -[bindToHost:port:]: " - @"SCTP unsupported, skipping tests"]; - break; - default: - @throw e; - } - - objc_autoreleasePoolPop(pool); - return; - } - - TEST(@"-[listen]", R([server listen])) - - TEST(@"-[connectToHost:port:]", - R([client connectToHost: @"127.0.0.1" - port: port])) - - TEST(@"-[accept]", (accepted = [server accept])) - - TEST(@"-[remoteAddress]", - [of_socket_address_ip_string(accepted.remoteAddress, NULL) - isEqual: @"127.0.0.1"]) - - TEST(@"-[sendBuffer:length:]", R([client sendBuffer: "Hello!" - length: 6])) - - TEST(@"-[receiveIntoBuffer:length:]", [accepted receiveIntoBuffer: buf - length: 6] && - !memcmp(buf, "Hello!", 6)) - - objc_autoreleasePoolPop(pool); -} -@end Index: tests/TestsAppDelegate.h ================================================================== --- tests/TestsAppDelegate.h +++ tests/TestsAppDelegate.h @@ -196,14 +196,10 @@ @interface TestsAppDelegate (OFSHA512HashTests) - (void)SHA512HashTests; @end -@interface TestsAppDelegate (OFSCTPSocketTests) -- (void)SCTPSocketTests; -@end - @interface TestsAppDelegate (OFSPXSocketTests) - (void)SPXSocketTests; @end @interface TestsAppDelegate (OFSPXStreamSocketTests) Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -348,13 +348,10 @@ #endif #ifdef OF_HAVE_SOCKETS [self socketTests]; [self TCPSocketTests]; [self UDPSocketTests]; -# ifdef OF_HAVE_SCTP - [self SCTPSocketTests]; -# endif # ifdef OF_HAVE_IPX [self IPXSocketTests]; [self SPXSocketTests]; [self SPXStreamSocketTests]; # endif