| 2315 | } |
| 2316 | |
| 2317 | Status CheckNotReleased() { |
| 2318 | if (StreamTraits::IsReleasedFunc(&stream_)) { |
| 2319 | return Status::Invalid( |
| 2320 | "Attempt to read from a stream that has already been closed"); |
| 2321 | } |
| 2322 | |
| 2323 | return Status::OK(); |
| 2324 | } |
| 2325 | |
| 2326 | Status StatusFromCError(int errno_like) const { |
| 2327 | return StatusFromCError(&stream_, errno_like); |