Differences From Artifact [e612790724]:
- File
src/OFStream.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: 39333) [annotate] [blame] [check-ins using]
To Artifact [34c16029c3]:
- File src/OFStream.m — part of check-in [0eb7274946] at 2021-11-06 17:00:13 on branch trunk — Fix too strict OFEnsure introduced in last checkin (user: js, size: 39334) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
1071 1072 1073 1074 1075 1076 1077 | if (bytesWritten == _writeBufferLength) { OFFreeMemory(_writeBuffer); _writeBuffer = NULL; _writeBufferLength = 0; } | | | 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | if (bytesWritten == _writeBufferLength) { OFFreeMemory(_writeBuffer); _writeBuffer = NULL; _writeBufferLength = 0; } OFEnsure(bytesWritten <= _writeBufferLength); memmove(_writeBuffer, _writeBuffer + bytesWritten, _writeBufferLength - bytesWritten); _writeBufferLength -= bytesWritten; @try { _writeBuffer = OFResizeMemory(_writeBuffer, _writeBufferLength, 1); |
︙ | ︙ |