Index: src/OFStreamSocket.h ================================================================== --- src/OFStreamSocket.h +++ src/OFStreamSocket.h @@ -26,25 +26,14 @@ /** * \brief A class which provides functions to create and use stream sockets. */ @interface OFStreamSocket: OFStream { -@public -#ifndef _WIN32 - int sock; -#else - SOCKET sock; -#endif - BOOL listening; -/* Work around a bug in gcc 4.4.4 (possibly only on Haiku) */ -#if !defined(__GNUC__) || __GNUC__ != 4 || __GNUC_MINOR__ != 4 || \ - __GNUC_PATCHLEVEL__ != 4 -@protected -#endif - BOOL eos; + int sock; + BOOL eos; } /** * \return A new autoreleased OFTCPSocket */ + socket; @end Index: src/OFStreamSocket.m ================================================================== --- src/OFStreamSocket.m +++ src/OFStreamSocket.m @@ -157,11 +157,10 @@ close(sock); sock = INVALID_SOCKET; eos = NO; - listening = NO; } - (void)dealloc { if (sock != INVALID_SOCKET) Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -34,10 +34,11 @@ * 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 OFTCPSocket: OFStreamSocket { + BOOL listening; struct sockaddr *sockAddr; socklen_t sockAddrLen; } /** Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -431,10 +431,11 @@ - (void)close { [super close]; + listening = NO; [self freeMemory: sockAddr]; sockAddr = NULL; sockAddrLen = 0; } @end