Lines Matching refs:Transport
34 class Transport::SocketPollData : public base::MessagePumpForIO::FdWatcher {
38 Transport* transport,
42 transport_(transport),
76 // CURL multi-handle associated with the transport.
78 // Transport object itself.
79 Transport* transport_;
90 struct Transport::AsyncRequestData {
101 Transport::Transport(const std::shared_ptr<CurlInterface>& curl_interface)
103 VLOG(2) << "curl::Transport created";
106 Transport::Transport(const std::shared_ptr<CurlInterface>& curl_interface,
109 VLOG(2) << "curl::Transport created with proxy " << proxy;
112 Transport::~Transport() {
114 VLOG(2) << "curl::Transport destroyed";
117 std::shared_ptr<http::Connection> Transport::CreateConnection(
209 void Transport::RunCallbackAsync(const base::Location& from_here,
215 RequestID Transport::StartAsyncTransfer(http::Connection* connection,
256 bool Transport::CancelRequest(RequestID request_id) {
269 void Transport::SetDefaultTimeout(base::TimeDelta timeout) {
273 void Transport::SetLocalIpAddress(const std::string& ip_address) {
277 void Transport::AddEasyCurlError(brillo::ErrorPtr* error,
286 void Transport::AddMultiCurlError(brillo::ErrorPtr* error,
295 bool Transport::SetupAsyncCurl(brillo::ErrorPtr* error) {
308 curl_multi_handle_, &Transport::MultiSocketCallback, this);
311 curl_multi_handle_, &Transport::MultiTimerCallback, this);
320 void Transport::ShutDownAsyncCurl() {
324 << "There are pending requests at the time of transport's shutdown";
333 int Transport::MultiSocketCallback(CURL* easy,
338 auto transport = static_cast<Transport*>(userp);
339 CHECK(transport) << "Transport must be set for this callback";
343 poll_data = new SocketPollData{transport->curl_interface_,
344 transport->curl_multi_handle_,
345 transport,
347 transport->poll_data_map_.emplace(std::make_pair(easy, s), poll_data);
348 transport->curl_interface_->MultiAssign(
349 transport->curl_multi_handle_, s, poll_data);
356 transport->curl_interface_->MultiAssign(
357 transport->curl_multi_handle_, s, nullptr);
358 transport->poll_data_map_.erase(std::make_pair(easy, s));
402 int Transport::MultiTimerCallback(CURLM* /* multi */,
405 auto transport = static_cast<Transport*>(userp);
407 transport->weak_ptr_factory_for_timer_.InvalidateWeakPtrs();
411 base::Bind(&Transport::OnTimer,
412 transport->weak_ptr_factory_for_timer_.GetWeakPtr()),
418 void Transport::OnTimer() {
427 void Transport::ProcessAsyncCurlMessages() {
446 void Transport::OnTransferComplete(Connection* connection, CURLcode code) {
486 // maintains the lifetime of |connection| and possibly even this Transport
491 base::Bind(&Transport::CleanAsyncConnection,
496 void Transport::CleanAsyncConnection(Connection* connection) {
500 // reference to the Connection class and even possibly to this Transport.
520 // destroyed as the result. See the comment in Transport::OnTransferComplete.