#include "net/socket/udp_client_socket.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "net/base/net_errors.h"
#include "net/base/network_change_notifier.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
namespace net {
namespace {
base::Value::Dict CreateNetLogUDPConnectParams(const IPEndPoint& address,
int net_error) { … }
base::Value::Dict CreateNetLogUDPBindToNetworkParams(
handles::NetworkHandle network,
int net_error) { … }
}
UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type,
net::NetLog* net_log,
const net::NetLogSource& source,
handles::NetworkHandle network)
: … { … }
UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type,
NetLogWithSource source_net_log,
handles::NetworkHandle network)
: … { … }
UDPClientSocket::~UDPClientSocket() { … }
int UDPClientSocket::Connect(const IPEndPoint& address) { … }
int UDPClientSocket::ConnectUsingNetwork(handles::NetworkHandle network,
const IPEndPoint& address) { … }
int UDPClientSocket::ConnectUsingDefaultNetwork(const IPEndPoint& address) { … }
int UDPClientSocket::ConnectAsync(const IPEndPoint& address,
CompletionOnceCallback callback) { … }
int UDPClientSocket::ConnectUsingNetworkAsync(handles::NetworkHandle network,
const IPEndPoint& address,
CompletionOnceCallback callback) { … }
int UDPClientSocket::ConnectUsingDefaultNetworkAsync(
const IPEndPoint& address,
CompletionOnceCallback callback) { … }
handles::NetworkHandle UDPClientSocket::GetBoundNetwork() const { … }
void UDPClientSocket::ApplySocketTag(const SocketTag& tag) { … }
int UDPClientSocket::Read(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int UDPClientSocket::Write(
IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback,
const NetworkTrafficAnnotationTag& traffic_annotation) { … }
void UDPClientSocket::Close() { … }
int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const { … }
int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const { … }
int UDPClientSocket::SetReceiveBufferSize(int32_t size) { … }
int UDPClientSocket::SetSendBufferSize(int32_t size) { … }
int UDPClientSocket::SetDoNotFragment() { … }
int UDPClientSocket::SetRecvTos() { … }
int UDPClientSocket::SetTos(DiffServCodePoint dscp, EcnCodePoint ecn) { … }
void UDPClientSocket::SetMsgConfirm(bool confirm) { … }
const NetLogWithSource& UDPClientSocket::NetLog() const { … }
void UDPClientSocket::UseNonBlockingIO() { … }
int UDPClientSocket::SetMulticastInterface(uint32_t interface_index) { … }
void UDPClientSocket::EnableRecvOptimization() { … }
void UDPClientSocket::SetIOSNetworkServiceType(int ios_network_service_type) { … }
int UDPClientSocket::AdoptOpenedSocket(AddressFamily address_family,
SocketDescriptor socket) { … }
DscpAndEcn UDPClientSocket::GetLastTos() const { … }
}