MCPcopy Create free account
hub / github.com/EasyIME/PIME / read_from_fd

Method read_from_fd

python/python3/tornado/iostream.py:304–317  ·  view source on GitHub ↗

Attempts to read from the underlying file. Reads up to ``len(buf)`` bytes, storing them in the buffer. Returns the number of bytes read. Returns None if there was nothing to read (the socket returned `~errno.EWOULDBLOCK` or equivalent), and zero on EOF. .. v

(self, buf: Union[bytearray, memoryview])

Source from the content-addressed store, hash-verified

302 raise NotImplementedError()
303
304 def read_from_fd(self, buf: Union[bytearray, memoryview]) -> Optional[int]:
305 """Attempts to read from the underlying file.
306
307 Reads up to ``len(buf)`` bytes, storing them in the buffer.
308 Returns the number of bytes read. Returns None if there was
309 nothing to read (the socket returned `~errno.EWOULDBLOCK` or
310 equivalent), and zero on EOF.
311
312 .. versionchanged:: 5.0
313
314 Interface redesigned to take a buffer and return a number
315 of bytes instead of a freshly-allocated object.
316 """
317 raise NotImplementedError()
318
319 def get_fd_error(self) -> Optional[Exception]:
320 """Returns information about any error on the underlying file.

Callers 1

_read_to_bufferMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected