Differences From Artifact [af410db94f]:
- File src/OFStream.h — part of check-in [52011fbfd6] at 2017-09-26 21:53:44 on branch trunk — Many nullability fixes (user: js, size: 42776) [annotate] [blame] [check-ins using]
To Artifact [7eb7553262]:
- File
src/OFStream.h
— part of check-in
[f3ccf14461]
at
2017-10-29 21:58:14
on branch trunk
— Convert methods to properties where appropriate
This improves Swift compatibility. (user: js, size: 42215) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
118 119 120 121 122 123 124 | size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; @protected bool _blocking; } /*! | | > > | > > > > | > > > | > > > > > > > > > > > > > > > > > | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; @protected bool _blocking; } /*! * Whether the end of the stream has been reached. */ @property (readonly, nonatomic, getter=isAtEndOfStream) bool atEndOfStream; /*! * Whether writes are buffered. */ @property (nonatomic, nonatomic, getter=isWriteBuffered) bool writeBuffered; /*! * Whether data is present in the internal read buffer. */ @property (readonly, nonatomic) bool hasDataInReadBuffer; /*! * Whether the stream is in blocking mode. * * By default, a stream is in blocking mode. * On Win32, setting this currently only works for sockets! */ @property (readonly, nonatomic, getter=isBlocking) bool blocking; /*! * The file descriptor for the read end of the stream. */ @property (readonly, nonatomic) int fileDescriptorForReading; /*! * The file descriptor for the write end of the stream. */ @property (readonly, nonatomic) int fileDescriptorForWriting; /*! * @brief Reads *at most* size bytes from the stream into a buffer. * * On network streams, this might read less than the specified number of bytes. * If you want to read exactly the specified number of bytes, use * @ref readIntoBuffer:exactLength:. Note that a read can even return 0 bytes - |
︙ | ︙ | |||
773 774 775 776 777 778 779 | * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ - (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter encoding: (of_string_encoding_t)encoding; | < < < < < < < < < < < < < < | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ - (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter encoding: (of_string_encoding_t)encoding; /*! * @brief Writes everything in the write buffer to the stream. */ - (void)flushWriteBuffer; /*! * @brief Writes from a buffer into the stream. |
︙ | ︙ | |||
1121 1122 1123 1124 1125 1126 1127 | * @param format A string used as format * @param arguments The arguments used in the format string * @return The number of bytes written */ - (size_t)writeFormat: (OFConstantString *)format arguments: (va_list)arguments; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 | * @param format A string used as format * @param arguments The arguments used in the format string * @return The number of bytes written */ - (size_t)writeFormat: (OFConstantString *)format arguments: (va_list)arguments; #ifdef OF_HAVE_SOCKETS /*! * @brief Cancels all pending asynchronous requests on the stream. */ - (void)cancelAsyncRequests; #endif |
︙ | ︙ |