#include <folly/io/async/AsyncPipe.h>
#include <folly/FileUtil.h>
#include <folly/Utility.h>
#include <folly/detail/FileUtilDetail.h>
#include <folly/io/async/AsyncSocketException.h>
string;
unique_ptr;
namespace folly {
AsyncPipeReader::~AsyncPipeReader() { … }
void AsyncPipeReader::failRead(const AsyncSocketException& ex) { … }
void AsyncPipeReader::close() { … }
#ifdef _WIN32
static int recv_internal(NetworkSocket s, void* buf, size_t count) {
auto r = netops::recv(s, buf, count, 0);
if (r == -1 && WSAGetLastError() == WSAEWOULDBLOCK) {
errno = EAGAIN;
}
return folly::to_narrow(r);
}
#endif
void AsyncPipeReader::handlerReady(uint16_t events) noexcept { … }
void AsyncPipeWriter::write(
unique_ptr<folly::IOBuf> buf, AsyncWriter::WriteCallback* callback) { … }
void AsyncPipeWriter::writeChain(
folly::AsyncWriter::WriteCallback* callback,
std::unique_ptr<folly::IOBuf>&& buf,
WriteFlags) { … }
void AsyncPipeWriter::closeOnEmpty() { … }
void AsyncPipeWriter::closeNow() { … }
void AsyncPipeWriter::failAllWrites(const AsyncSocketException& ex) { … }
void AsyncPipeWriter::handlerReady(uint16_t events) noexcept { … }
#ifdef _WIN32
static int send_internal(NetworkSocket s, const void* buf, size_t count) {
auto r = netops::send(s, buf, count, 0);
if (r == -1 && WSAGetLastError() == WSAEWOULDBLOCK) {
errno = EAGAIN;
}
return folly::to_narrow(r);
}
#endif
void AsyncPipeWriter::handleWrite() { … }
}