@@ -146,10 +146,11 @@ while (readLength < length) readLength += [self readIntoBuffer: (char*)buffer + readLength length: length - readLength]; } +#ifdef OF_HAVE_SOCKETS - (void)asyncReadIntoBuffer: (void*)buffer length: (size_t)length target: (id)target selector: (SEL)selector { @@ -170,11 +171,11 @@ exactLength: length target: target selector: selector]; } -#ifdef OF_HAVE_BLOCKS +# ifdef OF_HAVE_BLOCKS - (void)asyncReadIntoBuffer: (void*)buffer length: (size_t)length block: (of_stream_async_read_block_t)block { [OFRunLoop OF_addAsyncReadForStream: self @@ -190,10 +191,11 @@ [OFRunLoop OF_addAsyncReadForStream: self buffer: buffer exactLength: length block: block]; } +# endif #endif - (uint8_t)readInt8 { uint8_t ret; @@ -731,10 +733,11 @@ return nil; return line; } +#ifdef OF_HAVE_SOCKETS - (void)asyncReadLineWithTarget: (id)target selector: (SEL)selector { [self asyncReadLineWithEncoding: OF_STRING_ENCODING_UTF_8 target: target @@ -749,11 +752,11 @@ encoding: encoding target: target selector: selector]; } -#ifdef OF_HAVE_BLOCKS +# ifdef OF_HAVE_BLOCKS - (void)asyncReadLineWithBlock: (of_stream_async_read_line_block_t)block { [self asyncReadLineWithEncoding: OF_STRING_ENCODING_UTF_8 block: block]; } @@ -763,10 +766,11 @@ { [OFRunLoop OF_addAsyncReadLineForStream: self encoding: encoding block: block]; } +# endif #endif - (OFString*)tryReadLine { return [self tryReadLineWithEncoding: OF_STRING_ENCODING_UTF_8]; @@ -1551,14 +1555,16 @@ { [self doesNotRecognizeSelector: _cmd]; abort(); } +#ifdef OF_HAVE_SOCKETS - (void)cancelAsyncRequests { [OFRunLoop OF_cancelAsyncRequestsForStream: self]; } +#endif - (void)close { [self doesNotRecognizeSelector: _cmd]; abort();