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

Function write

3rdparty/libprocess/src/windows/io.cpp:71–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71Future<size_t> write(int_fd fd, const void* data, size_t size)
72{
73 process::initialize();
74
75 // TODO(benh): Let the system calls do what ever they're supposed to
76 // rather than return 0 here?
77 if (size == 0) {
78 return 0;
79 }
80
81 // Just do a synchronous call.
82 if (!fd.is_overlapped()) {
83 ssize_t result = os::write(fd, data, size);
84 if (result == -1) {
85 return Failure(WindowsError().message);
86 }
87 return static_cast<size_t>(result);
88 }
89
90 return windows::write(fd, data, size);
91}
92
93
94Try<Nothing> prepare_async(int_fd fd)

Callers 1

sendMethod · 0.70

Calls 4

FailureClass · 0.85
WindowsErrorClass · 0.85
is_overlappedMethod · 0.80
initializeFunction · 0.50

Tested by

no test coverage detected