MCPcopy Create free account
hub / github.com/3rdparty/libprocess / read

Function read

src/io.cpp:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53Future<size_t> read(int_fd fd, void* data, size_t size)
54{
55 process::initialize();
56
57 // Check the file descriptor.
58 Try<bool> async = is_async(fd);
59 if (async.isError()) {
60 // The file descriptor is not valid (e.g., has been closed).
61 return Failure(
62 "Failed to check if file descriptor was asynchronous: " +
63 async.error());
64 } else if (!async.get()) {
65 return Failure("Expected an asynchronous file descriptor.");
66 }
67
68 return internal::read(fd, data, size);
69}
70
71
72Future<size_t> write(int_fd fd, const void* data, size_t size)

Callers 3

spliceFunction · 0.70
initializeMethod · 0.70
_readMethod · 0.70

Calls 10

FailureClass · 0.85
cloexecFunction · 0.85
closeFunction · 0.85
loopFunction · 0.85
initializeFunction · 0.70
is_asyncFunction · 0.70
prepare_asyncFunction · 0.70
BreakFunction · 0.50
ContinueClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected