#include "base/sync_socket.h"
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <poll.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/files/file_util.h"
#include "base/numerics/safe_conversions.h"
#include "base/threading/scoped_blocking_call.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_SOLARIS)
#include <sys/filio.h>
#endif
namespace base {
namespace {
const size_t kMaxMessageLength = …;
size_t SendHelper(SyncSocket::Handle handle, span<const uint8_t> data) { … }
}
bool SyncSocket::CreatePair(SyncSocket* socket_a, SyncSocket* socket_b) { … }
void SyncSocket::Close() { … }
size_t SyncSocket::Send(span<const uint8_t> data) { … }
size_t SyncSocket::Receive(span<uint8_t> buffer) { … }
size_t SyncSocket::ReceiveWithTimeout(span<uint8_t> buffer, TimeDelta timeout) { … }
size_t SyncSocket::Peek() { … }
bool SyncSocket::IsValid() const { … }
SyncSocket::Handle SyncSocket::handle() const { … }
SyncSocket::Handle SyncSocket::Release() { … }
bool CancelableSyncSocket::Shutdown() { … }
size_t CancelableSyncSocket::Send(span<const uint8_t> data) { … }
bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a,
CancelableSyncSocket* socket_b) { … }
}