Differences From Artifact [3125ef69c3]:
- File src/OFStream.m — part of check-in [0a4565fb0f] at 2017-11-05 18:25:38 on branch trunk — Use -[isMemberOfClass:] instead of object_getClass (user: js, size: 35419) [annotate] [blame] [check-ins using]
To Artifact [e841a9f1c7]:
- File
src/OFStream.m
— part of check-in
[69749b6a5b]
at
2017-11-19 11:04:22
on branch trunk
— Do not conform to OFReadyFor*Observing by default
Instead of letting OFStream conform to it, which itself does not really
conform to it, let all the subclasses that actually do conform to it. (user: js, size: 36251) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
191 192 193 194 195 196 197 | #ifdef OF_HAVE_SOCKETS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector context: (id)context { | > > > | > > > | > > > | > > > | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | #ifdef OF_HAVE_SOCKETS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector context: (id)context { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length target: target selector: selector context: context]; } - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length target: (id)target selector: (SEL)selector context: (id)context { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length target: target selector: selector context: context]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length block: (of_stream_async_read_block_t)block { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length block: block]; } - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length block: (of_stream_async_read_block_t)block { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length block: block]; } # endif #endif |
︙ | ︙ | |||
826 827 828 829 830 831 832 | } - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding target: (id)target selector: (SEL)selector context: (id)context { | > > > | > > > | | 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | } - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding target: (id)target selector: (SEL)selector context: (id)context { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding target: target selector: selector context: context]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadLineWithBlock: (of_stream_async_read_line_block_t)block { [self asyncReadLineWithEncoding: OF_STRING_ENCODING_UTF_8 block: block]; } - (void)asyncReadLineWithEncoding: (of_string_encoding_t)encoding block: (of_stream_async_read_line_block_t)block { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding block: block]; } # endif #endif - (OFString *)tryReadLine |
︙ | ︙ | |||
1075 1076 1077 1078 1079 1080 1081 | #ifdef OF_HAVE_SOCKETS - (void)asyncWriteBuffer: (const void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector context: (id)context { | > > > | > > > | | 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | #ifdef OF_HAVE_SOCKETS - (void)asyncWriteBuffer: (const void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector context: (id)context { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream buffer: buffer length: length target: target selector: selector context: context]; } # ifdef OF_HAVE_BLOCKS - (void)asyncWriteBuffer: (const void *)buffer length: (size_t)length block: (of_stream_async_write_block_t)block { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream buffer: buffer length: length block: block]; } # endif #endif |
︙ | ︙ |