#ifndef RTC_BASE_SOCKET_H_
#define RTC_BASE_SOCKET_H_
#include <errno.h>
#include "absl/types/optional.h"
#include "rtc_base/checks.h"
#if defined(WEBRTC_POSIX)
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#define SOCKET_EACCES …
#endif
#if defined(WEBRTC_WIN)
#include "rtc_base/win32.h"
#endif
#include "api/units/timestamp.h"
#include "rtc_base/buffer.h"
#include "rtc_base/network/ecn_marking.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#if defined(WEBRTC_WIN)
#undef EWOULDBLOCK
#define EWOULDBLOCK …
#undef EINPROGRESS
#define EINPROGRESS …
#undef EALREADY
#define EALREADY …
#undef EMSGSIZE
#define EMSGSIZE …
#undef EADDRINUSE
#define EADDRINUSE …
#undef EADDRNOTAVAIL
#define EADDRNOTAVAIL …
#undef ENETDOWN
#define ENETDOWN …
#undef ECONNABORTED
#define ECONNABORTED …
#undef ENOBUFS
#define ENOBUFS …
#undef EISCONN
#define EISCONN …
#undef ENOTCONN
#define ENOTCONN …
#undef ECONNREFUSED
#define ECONNREFUSED …
#undef EHOSTUNREACH
#define EHOSTUNREACH …
#undef ENETUNREACH
#define ENETUNREACH …
#define SOCKET_EACCES …
#endif
#if defined(WEBRTC_POSIX)
#define INVALID_SOCKET …
#define SOCKET_ERROR …
#define closesocket(s) …
#endif
namespace rtc {
inline bool IsBlockingError(int e) { … }
class RTC_EXPORT Socket { … };
}
#endif