@@ -7,48 +7,16 @@ * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ -#include - -/* - * Headers for UNIX systems - */ -#ifndef _WIN32 -#include -#include -#include -#endif - -#import "OFStream.h" - -/* - * Headers for Win32 - * - * These must be imported after objc/Object and thus OFObject! - */ -#ifdef _WIN32 -#define _WIN32_WINNT 0x0501 -#include -#include -#endif +#import "OFSocket.h" /** * The OFTCPSocket class provides functions to create and use sockets. */ -@interface OFTCPSocket: OFStream -{ -#ifndef _WIN32 - int sock; -#else - SOCKET sock; -#endif - struct sockaddr *saddr; - socklen_t saddr_len; -} - +@interface OFTCPSocket: OFSocket {} /** * \return A new autoreleased OFTCPSocket */ + tcpSocket; @@ -95,15 +63,10 @@ * Accept an incoming connection. * \return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; -/** - * Enables/disables non-blocking I/O. - */ -- setBlocking: (BOOL)enable; - /** * Enable or disable keep alives for the connection. */ - enableKeepAlives: (BOOL)enable;