@@ -23,10 +23,11 @@ #ifdef HAVE_FCNTL_H # include #endif #import "OFSequencedPacketSocket.h" +#import "OFSequencedPacketSocket+Private.h" #import "OFData.h" #import "OFRunLoop+Private.h" #import "OFRunLoop.h" #import "OFAcceptFailedException.h" @@ -85,10 +86,24 @@ if (_socket != INVALID_SOCKET) [self close]; [super dealloc]; } + +#ifndef OF_WII +- (int)of_socketError +{ + int errNo; + socklen_t len = sizeof(errNo); + + if (getsockopt(_socket, SOL_SOCKET, SO_ERROR, (char *)&errNo, + &len) != 0) + return of_socket_errno(); + + return errNo; +} +#endif - (id)copy { return [self retain]; } @@ -418,15 +433,10 @@ @throw [OFOutOfRangeException exception]; return &_remoteAddress; } -- (bool)isListening -{ - return _listening; -} - - (void)cancelAsyncRequests { [OFRunLoop of_cancelAsyncRequestsForObject: self mode: of_run_loop_mode_default]; }