#include "p2p/base/stun_request.h"
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
#include "absl/memory/memory.h"
#include "api/task_queue/pending_task_safety_flag.h"
#include "rtc_base/checks.h"
#include "rtc_base/crypto_random.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_encode.h"
#include "rtc_base/time_utils.h"
namespace cricket {
SafeTask;
const int STUN_INITIAL_RTO = …;
const int STUN_MAX_RETRANSMISSIONS = …;
const int STUN_MAX_RTO = …;
StunRequestManager::StunRequestManager(
webrtc::TaskQueueBase* thread,
std::function<void(const void*, size_t, StunRequest*)> send_packet)
: … { … }
StunRequestManager::~StunRequestManager() = default;
void StunRequestManager::Send(StunRequest* request) { … }
void StunRequestManager::SendDelayed(StunRequest* request, int delay) { … }
void StunRequestManager::FlushForTest(int msg_type) { … }
bool StunRequestManager::HasRequestForTest(int msg_type) { … }
void StunRequestManager::Clear() { … }
bool StunRequestManager::CheckResponse(StunMessage* msg) { … }
bool StunRequestManager::empty() const { … }
bool StunRequestManager::CheckResponse(const char* data, size_t size) { … }
void StunRequestManager::OnRequestTimedOut(StunRequest* request) { … }
void StunRequestManager::SendPacket(const void* data,
size_t size,
StunRequest* request) { … }
StunRequest::StunRequest(StunRequestManager& manager)
: … { … }
StunRequest::StunRequest(StunRequestManager& manager,
std::unique_ptr<StunMessage> message)
: … { … }
StunRequest::~StunRequest() { … }
int StunRequest::type() { … }
const StunMessage* StunRequest::msg() const { … }
int StunRequest::Elapsed() const { … }
void StunRequest::SendInternal() { … }
void StunRequest::SendDelayed(webrtc::TimeDelta delay) { … }
void StunRequest::Send(webrtc::TimeDelta delay) { … }
void StunRequest::ResetTasksForTest() { … }
void StunRequest::OnSent() { … }
int StunRequest::resend_delay() { … }
void StunRequest::set_timed_out() { … }
}