13 #ifndef __STOUT_OS_WINDOWS_READ_HPP__ 14 #define __STOUT_OS_WINDOWS_READ_HPP__ 30 CHECK_LE(size, UINT_MAX);
35 return ::_read(fd.
crt(), data,
static_cast<unsigned int>(
size));
38 return ::recv(fd, (
char*)data, static_cast<unsigned int>(size), 0);
47 #endif // __STOUT_OS_WINDOWS_READ_HPP__ SSIZE_T ssize_t
Definition: windows.hpp:192
Type type() const
Definition: fd.hpp:121
Try< Bytes > size(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)
Definition: stat.hpp:100
Definition: posix_signalhandler.hpp:23
ssize_t recv(const os::WindowsFD &fd, void *buf, size_t len, int flags)
Definition: socket.hpp:171
#define UNREACHABLE()
Definition: unreachable.hpp:22
Result< std::string > read(int_fd fd, size_t size)
Definition: read.hpp:50
int crt() const
Definition: fd.hpp:97