#include "third_party/webrtc_overrides/rtc_base/fake_socket_factory.h"
#include "base/check.h"
#include "base/check_op.h"
#include "third_party/webrtc/rtc_base/ip_address.h"
#include "third_party/webrtc/rtc_base/socket_address.h"
namespace blink {
namespace {
const uint16_t kFirstEphemeralPort = …;
const uint16_t kLastEphemeralPort = …;
const uint16_t kEphemeralPortCount = …;
}
FakeSocket::FakeSocket(FakeSocketFactory* factory, int family, int type)
: … { … }
rtc::SocketAddress FakeSocket::GetLocalAddress() const { … }
rtc::SocketAddress FakeSocket::GetRemoteAddress() const { … }
int FakeSocket::Bind(const rtc::SocketAddress& addr) { … }
int FakeSocket::Close() { … }
int FakeSocket::GetError() const { … }
void FakeSocket::SetError(int error) { … }
rtc::Socket::ConnState FakeSocket::GetState() const { … }
FakeSocketFactory::FakeSocketFactory() : … { … }
rtc::Socket* FakeSocketFactory::CreateSocket(int family, int type) { … }
uint16_t FakeSocketFactory::GetNextPort() { … }
rtc::SocketAddress FakeSocketFactory::AssignBindAddress(
const rtc::SocketAddress& addr) { … }
int FakeSocketFactory::Bind(FakeSocket* socket,
const rtc::SocketAddress& addr) { … }
int FakeSocketFactory::Unbind(const rtc::SocketAddress& addr,
FakeSocket* socket) { … }
}