Differences From Artifact [d516c427cd]:
- File
src/OFTCPSocket.m
— part of check-in
[f218986f51]
at
2018-12-18 14:14:25
on branch trunk
— Use OFData instead of a buffer for async writes
This avoids the entire problem of keeping the buffer alive until the
write finished. (user: js, size: 25724) [annotate] [blame] [check-ins using]
To Artifact [9927726f3b]:
- File src/OFTCPSocket.m — part of check-in [3501205f07] at 2018-12-18 17:10:58 on branch trunk — Slightly decrease binary size (user: js, size: 25794) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
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]; |
︙ | ︙ |