MCPcopy Create free account
hub / github.com/apache/mesos / read

Function read

3rdparty/libprocess/src/io.cpp:53–73  ·  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#ifndef ENABLE_LIBWINIO
69 return internal::read(fd, data, size);
70#else
71 return internal::read(fd, data, size, true);
72#endif // ENABLE_LIBWINIO
73}
74
75
76Future<size_t> write(int_fd fd, const void* data, size_t size)

Callers 3

spliceFunction · 0.70
initializeMethod · 0.70
_readMethod · 0.70

Calls 15

FailureClass · 0.85
strerrorFunction · 0.85
loopFunction · 0.85
NoneClass · 0.85
initializeFunction · 0.70
is_asyncFunction · 0.70
closeFunction · 0.70
prepare_asyncFunction · 0.70
errorMethod · 0.65
dupFunction · 0.50
cloexecFunction · 0.50
BreakFunction · 0.50

Tested by

no test coverage detected