Differences From Artifact [e9219b696c]:
- File tests/OFTCPSocketTests.m — part of check-in [c8663697ae] at 2021-05-08 23:29:45 on branch trunk — tests: Minor const improvement (user: js, size: 1543) [annotate] [blame] [check-ins using] [more...]
To Artifact [969fff7c8b]:
- File
tests/OFTCPSocketTests.m
— part of check-in
[d1d36ae522]
at
2021-11-06 15:57:29
on branch trunk
— OFStream: New write API
The old write API made it too easy to lose bytes when a stream is set to
non-blocking mode. The new API always throws when not all bytes were
written, which forces handling the number of bytes being written being
smaller than the number of bytes requested to be written. (user: js, size: 1546) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
42 43 44 45 46 47 48 | TEST(@"-[accept]", (accepted = [server accept])) TEST(@"-[remoteAddress]", [OFSocketAddressString(accepted.remoteAddress) isEqual: @"127.0.0.1"]) | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | TEST(@"-[accept]", (accepted = [server accept])) TEST(@"-[remoteAddress]", [OFSocketAddressString(accepted.remoteAddress) isEqual: @"127.0.0.1"]) TEST(@"-[writeString:]", R([client writeString: @"Hello!"])) TEST(@"-[readIntoBuffer:length:]", [accepted readIntoBuffer: buffer length: 6] && !memcmp(buffer, "Hello!", 6)) objc_autoreleasePoolPop(pool); } @end |