Overview
Comment: | Slightly decrease binary size |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3501205f0734b055655bf5b4397565e9 |
User & Date: | js on 2018-12-18 17:10:58 |
Other Links: | manifest | tags |
Context
2018-12-18
| ||
17:14 | OFHTTPClient: Fix type mismatch check-in: 9036359e2e user: js tags: trunk | |
17:10 | Slightly decrease binary size check-in: 3501205f07 user: js tags: trunk | |
16:41 | Add -[OFStream asyncWriteString:] check-in: 6b35b78f94 user: js tags: trunk | |
Changes
Modified src/OFRunLoop+Private.h from [a4331637be] to [55f8a4342c].
︙ | ︙ | |||
37 38 39 40 41 42 43 | + (void)of_setMainRunLoop: (OFRunLoop *)runLoop; #ifdef OF_HAVE_SOCKETS + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length mode: (of_run_loop_mode_t)mode | > > > | > > > | > > > > > | > > > > | > > > > > | > > > > > | > > > > > > | > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < > > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + (void)of_setMainRunLoop: (OFRunLoop *)runLoop; #ifdef OF_HAVE_SOCKETS + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_stream_async_read_block_t)block # endif delegate: (nullable id <OFStreamDelegate>)delegate; + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer exactLength: (size_t)length mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_stream_async_read_block_t)block # endif delegate: (nullable id <OFStreamDelegate>)delegate; + (void)of_addAsyncReadLineForStream: (OFStream <OFReadyForReadingObserving> *) stream encoding: (of_string_encoding_t)encoding mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_stream_async_read_line_block_t) block # endif delegate: (nullable id <OFStreamDelegate>)delegate; + (void)of_addAsyncWriteForStream: (OFStream <OFReadyForWritingObserving> *) stream data: (OFData *)data mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_stream_async_write_data_block_t) block # endif delegate: (nullable id <OFStreamDelegate>)delegate; + (void)of_addAsyncWriteForStream: (OFStream <OFReadyForWritingObserving> *) stream string: (OFString *)string encoding: (of_string_encoding_t)encoding mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_stream_async_write_string_block_t) block # endif delegate: (nullable id <OFStreamDelegate>)delegate; + (void)of_addAsyncConnectForTCPSocket: (OFTCPSocket *)socket mode: (of_run_loop_mode_t)mode delegate: (id <OFTCPSocketDelegate_Private>) delegate; + (void)of_addAsyncAcceptForTCPSocket: (OFTCPSocket *)socket mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_tcp_socket_async_accept_block_t) block # endif delegate: (nullable id <OFTCPSocketDelegate>) delegate; + (void)of_addAsyncReceiveForUDPSocket: (OFUDPSocket *)socket buffer: (void *)buffer length: (size_t)length mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_udp_socket_async_receive_block_t) block # endif delegate: (nullable id <OFUDPSocketDelegate>) delegate; + (void)of_addAsyncSendForUDPSocket: (OFUDPSocket *)socket buffer: (const void *)buffer length: (size_t)length receiver: (of_socket_address_t)receiver mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (nullable of_udp_socket_async_send_block_t) block # endif delegate: (nullable id <OFUDPSocketDelegate>) delegate; + (void)of_cancelAsyncRequestsForObject: (id)object mode: (of_run_loop_mode_t)mode; #endif - (void)of_removeTimer: (OFTimer *)timer forMode: (of_run_loop_mode_t)mode; @end OF_ASSUME_NONNULL_END |
Modified src/OFRunLoop.m from [e91294dd59] to [8d0f224f35].
︙ | ︙ | |||
777 778 779 780 781 782 783 | + (void)of_setMainRunLoop: (OFRunLoop *)runLoop { mainRunLoop = [runLoop retain]; } #ifdef OF_HAVE_SOCKETS | | | < < < < | | | > > > | > | > > > | | | > > > > | > | > > > | | | > > > > | > | > > > | | > > > > | > | > > > | | > > > > | > | > > > | | | > | > | | > > > > | > | > > > | > > > > > | > | > > > | | | > > > > | < < < < < | | < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > | | > | 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 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 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | + (void)of_setMainRunLoop: (OFRunLoop *)runLoop { mainRunLoop = [runLoop retain]; } #ifdef OF_HAVE_SOCKETS # define NEW_READ(type, object, mode) \ void *pool = objc_autoreleasePoolPush(); \ OFRunLoop *runLoop = [self currentRunLoop]; \ OFRunLoop_State *state = [runLoop of_stateForMode: mode \ create: true]; \ OFList *queue = [state->_readQueues objectForKey: object]; \ type *queueItem; \ \ if (queue == nil) { \ queue = [OFList list]; \ [state->_readQueues setObject: queue \ forKey: object]; \ } \ \ if ([queue count] == 0) \ [state->_kernelEventObserver \ addObjectForReading: object]; \ \ queueItem = [[[type alloc] init] autorelease]; # define NEW_WRITE(type, object, mode) \ void *pool = objc_autoreleasePoolPush(); \ OFRunLoop *runLoop = [self currentRunLoop]; \ OFRunLoop_State *state = [runLoop of_stateForMode: mode \ create: true]; \ OFList *queue = [state->_writeQueues objectForKey: object]; \ type *queueItem; \ \ if (queue == nil) { \ queue = [OFList list]; \ [state->_writeQueues setObject: queue \ forKey: object]; \ } \ \ if ([queue count] == 0) \ [state->_kernelEventObserver \ addObjectForWriting: object]; \ \ queueItem = [[[type alloc] init] autorelease]; #define QUEUE_ITEM \ [queue appendObject: queueItem]; \ \ objc_autoreleasePoolPop(pool); + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_stream_async_read_block_t)block # endif delegate: (id <OFStreamDelegate>)delegate { NEW_READ(OFRunLoop_ReadQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_buffer = buffer; queueItem->_length = length; QUEUE_ITEM } + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer exactLength: (size_t)exactLength mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_stream_async_read_block_t)block # endif delegate: (id <OFStreamDelegate>)delegate { NEW_READ(OFRunLoop_ExactReadQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_buffer = buffer; queueItem->_exactLength = exactLength; QUEUE_ITEM } + (void)of_addAsyncReadLineForStream: (OFStream <OFReadyForReadingObserving> *) stream encoding: (of_string_encoding_t)encoding mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_stream_async_read_line_block_t)block # endif delegate: (id <OFStreamDelegate>)delegate { NEW_READ(OFRunLoop_ReadLineQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_encoding = encoding; QUEUE_ITEM } + (void)of_addAsyncWriteForStream: (OFStream <OFReadyForWritingObserving> *) stream data: (OFData *)data mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_stream_async_write_data_block_t)block # endif delegate: (id <OFStreamDelegate>)delegate { NEW_WRITE(OFRunLoop_WriteDataQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_data = [data copy]; QUEUE_ITEM } + (void)of_addAsyncWriteForStream: (OFStream <OFReadyForWritingObserving> *) stream string: (OFString *)string encoding: (of_string_encoding_t)encoding mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_stream_async_write_string_block_t)block # endif delegate: (id <OFStreamDelegate>)delegate { NEW_WRITE(OFRunLoop_WriteStringQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_string = [string copy]; queueItem->_encoding = encoding; QUEUE_ITEM } + (void)of_addAsyncConnectForTCPSocket: (OFTCPSocket *)stream mode: (of_run_loop_mode_t)mode delegate: (id <OFTCPSocketDelegate_Private>) delegate { NEW_WRITE(OFRunLoop_ConnectQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; QUEUE_ITEM } + (void)of_addAsyncAcceptForTCPSocket: (OFTCPSocket *)stream mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_tcp_socket_async_accept_block_t)block # endif delegate: (id <OFTCPSocketDelegate>)delegate { NEW_READ(OFRunLoop_AcceptQueueItem, stream, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif QUEUE_ITEM } + (void)of_addAsyncReceiveForUDPSocket: (OFUDPSocket *)sock buffer: (void *)buffer length: (size_t)length mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_udp_socket_async_receive_block_t) block # endif delegate: (id <OFUDPSocketDelegate>)delegate { NEW_READ(OFRunLoop_UDPReceiveQueueItem, sock, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_buffer = buffer; queueItem->_length = length; QUEUE_ITEM } + (void)of_addAsyncSendForUDPSocket: (OFUDPSocket *)sock buffer: (const void *)buffer length: (size_t)length receiver: (of_socket_address_t)receiver mode: (of_run_loop_mode_t)mode # ifdef OF_HAVE_BLOCKS block: (of_udp_socket_async_send_block_t)block # endif delegate: (id <OFUDPSocketDelegate>)delegate { NEW_WRITE(OFRunLoop_UDPSendQueueItem, sock, mode) queueItem->_delegate = [delegate retain]; # ifdef OF_HAVE_BLOCKS queueItem->_block = [block copy]; # endif queueItem->_buffer = buffer; queueItem->_length = length; queueItem->_receiver = receiver; QUEUE_ITEM } # undef NEW_READ # undef NEW_WRITE # undef QUEUE_ITEM + (void)of_cancelAsyncRequestsForObject: (id)object mode: (of_run_loop_mode_t)mode { void *pool = objc_autoreleasePoolPush(); OFRunLoop *runLoop = [self currentRunLoop]; OFRunLoop_State *state = [runLoop of_stateForMode: mode |
︙ | ︙ |
Modified src/OFStream.m from [9ea61c11ef] to [f301e89c81].
︙ | ︙ | |||
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length mode: runLoopMode delegate: _delegate]; } - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length { [self asyncReadIntoBuffer: buffer | > > > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length { [self asyncReadIntoBuffer: buffer |
︙ | ︙ | |||
232 233 234 235 236 237 238 239 240 241 242 243 244 245 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length mode: runLoopMode delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length block: (of_stream_async_read_block_t)block | > > > | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length block: (of_stream_async_read_block_t)block |
︙ | ︙ | |||
258 259 260 261 262 263 264 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length mode: runLoopMode | | > | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer length: length mode: runLoopMode block: block delegate: nil]; } - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length block: (of_stream_async_read_block_t)block { [self asyncReadIntoBuffer: buffer |
︙ | ︙ | |||
283 284 285 286 287 288 289 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length mode: runLoopMode | | > | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadForStream: stream buffer: buffer exactLength: length mode: runLoopMode block: block delegate: nil]; } # endif #endif - (uint8_t)readInt8 { uint8_t ret; |
︙ | ︙ | |||
883 884 885 886 887 888 889 890 891 892 893 894 895 896 | { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding mode: runLoopMode delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadLineWithBlock: (of_stream_async_read_line_block_t)block { [self asyncReadLineWithEncoding: OF_STRING_ENCODING_UTF_8 | > > > | 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 | { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncReadLineWithBlock: (of_stream_async_read_line_block_t)block { [self asyncReadLineWithEncoding: OF_STRING_ENCODING_UTF_8 |
︙ | ︙ | |||
912 913 914 915 916 917 918 | { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding mode: runLoopMode | | > | 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 | { OFStream <OFReadyForReadingObserving> *stream = (OFStream <OFReadyForReadingObserving> *)self; [OFRunLoop of_addAsyncReadLineForStream: stream encoding: encoding mode: runLoopMode block: block delegate: nil]; } # endif #endif - (OFString *)tryReadLine { return [self tryReadLineWithEncoding: OF_STRING_ENCODING_UTF_8]; |
︙ | ︙ | |||
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream data: data mode: runLoopMode delegate: _delegate]; } - (void)asyncWriteString: (OFString *)string { [self asyncWriteString: string encoding: OF_STRING_ENCODING_UTF_8 | > > > | 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 | { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream data: data mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } - (void)asyncWriteString: (OFString *)string { [self asyncWriteString: string encoding: OF_STRING_ENCODING_UTF_8 |
︙ | ︙ | |||
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 | OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream string: string encoding: encoding mode: runLoopMode delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncWriteData: (OFData *)data block: (of_stream_async_write_data_block_t)block { | > > > | 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 | OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream string: string encoding: encoding mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } # ifdef OF_HAVE_BLOCKS - (void)asyncWriteData: (OFData *)data block: (of_stream_async_write_data_block_t)block { |
︙ | ︙ | |||
1228 1229 1230 1231 1232 1233 1234 | { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream data: data mode: runLoopMode | | > | 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 | { OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream data: data mode: runLoopMode block: block delegate: nil]; } - (void)asyncWriteString: (OFString *)string block: (of_stream_async_write_string_block_t)block { [self asyncWriteString: string encoding: OF_STRING_ENCODING_UTF_8 |
︙ | ︙ | |||
1262 1263 1264 1265 1266 1267 1268 | OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream string: string encoding: encoding mode: runLoopMode | | > | 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 | OFStream <OFReadyForWritingObserving> *stream = (OFStream <OFReadyForWritingObserving> *)self; [OFRunLoop of_addAsyncWriteForStream: stream string: string encoding: encoding mode: runLoopMode block: block delegate: nil]; } # endif #endif - (void)writeInt8: (uint8_t)int8 { [self writeBuffer: (char *)&int8 |
︙ | ︙ |
Modified src/OFTCPSocket.m from [d516c427cd] to [9927726f3b].
︙ | ︙ | |||
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | [self asyncAcceptWithRunLoopMode: of_run_loop_mode_default]; } - (void)asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncAcceptForTCPSocket: self mode: runLoopMode delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block { [self asyncAcceptWithRunLoopMode: of_run_loop_mode_default block: block]; } - (void)asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_tcp_socket_async_accept_block_t)block { [OFRunLoop of_addAsyncAcceptForTCPSocket: self mode: runLoopMode | > > > | > | 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 | [self asyncAcceptWithRunLoopMode: of_run_loop_mode_default]; } - (void)asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncAcceptForTCPSocket: self mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block { [self asyncAcceptWithRunLoopMode: of_run_loop_mode_default block: block]; } - (void)asyncAcceptWithRunLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_tcp_socket_async_accept_block_t)block { [OFRunLoop of_addAsyncAcceptForTCPSocket: self mode: runLoopMode block: block delegate: nil]; } #endif - (const of_socket_address_t *)remoteAddress { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; |
︙ | ︙ |
Modified src/OFUDPSocket.m from [a173a95dac] to [9559b91b20].
︙ | ︙ | |||
339 340 341 342 343 344 345 346 347 348 349 350 351 352 | length: (size_t)length runLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncReceiveForUDPSocket: self buffer: buffer length: length mode: runLoopMode delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length block: (of_udp_socket_async_receive_block_t)block | > > > | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | length: (size_t)length runLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncReceiveForUDPSocket: self buffer: buffer length: length mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length block: (of_udp_socket_async_receive_block_t)block |
︙ | ︙ | |||
362 363 364 365 366 367 368 | runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_udp_socket_async_receive_block_t)block { [OFRunLoop of_addAsyncReceiveForUDPSocket: self buffer: buffer length: length mode: runLoopMode | | > | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | runLoopMode: (of_run_loop_mode_t)runLoopMode block: (of_udp_socket_async_receive_block_t)block { [OFRunLoop of_addAsyncReceiveForUDPSocket: self buffer: buffer length: length mode: runLoopMode block: block delegate: nil]; } #endif - (void)sendBuffer: (const void *)buffer length: (size_t)length receiver: (const of_socket_address_t *)receiver { |
︙ | ︙ | |||
428 429 430 431 432 433 434 435 436 437 438 439 440 441 | runLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncSendForUDPSocket: self buffer: buffer length: length receiver: receiver mode: runLoopMode delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncSendBuffer: (const void *)buffer length: (size_t)length receiver: (of_socket_address_t)receiver | > > > | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | runLoopMode: (of_run_loop_mode_t)runLoopMode { [OFRunLoop of_addAsyncSendForUDPSocket: self buffer: buffer length: length receiver: receiver mode: runLoopMode # ifdef OF_HAVE_BLOCKS block: NULL # endif delegate: _delegate]; } #ifdef OF_HAVE_BLOCKS - (void)asyncSendBuffer: (const void *)buffer length: (size_t)length receiver: (of_socket_address_t)receiver |
︙ | ︙ | |||
455 456 457 458 459 460 461 | block: (of_udp_socket_async_send_block_t)block { [OFRunLoop of_addAsyncSendForUDPSocket: self buffer: buffer length: length receiver: receiver mode: runLoopMode | | > | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | block: (of_udp_socket_async_send_block_t)block { [OFRunLoop of_addAsyncSendForUDPSocket: self buffer: buffer length: length receiver: receiver mode: runLoopMode block: block delegate: nil]; } #endif - (void)cancelAsyncRequests { [OFRunLoop of_cancelAsyncRequestsForObject: self mode: of_run_loop_mode_default]; |
︙ | ︙ |