Lines Matching refs:Transport
34 class Transport::SocketPollData : public base::MessageLoopForIO::Watcher {
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(
205 void Transport::RunCallbackAsync(const tracked_objects::Location& from_here,
211 RequestID Transport::StartAsyncTransfer(http::Connection* connection,
252 bool Transport::CancelRequest(RequestID request_id) {
265 void Transport::SetDefaultTimeout(base::TimeDelta timeout) {
269 void Transport::AddEasyCurlError(brillo::ErrorPtr* error,
278 void Transport::AddMultiCurlError(brillo::ErrorPtr* error,
287 bool Transport::SetupAsyncCurl(brillo::ErrorPtr* error) {
300 curl_multi_handle_, &Transport::MultiSocketCallback, this);
303 curl_multi_handle_, &Transport::MultiTimerCallback, this);
312 void Transport::ShutDownAsyncCurl() {
316 << "There are pending requests at the time of transport's shutdown";
325 int Transport::MultiSocketCallback(CURL* easy,
330 auto transport = static_cast<Transport*>(userp);
331 CHECK(transport) << "Transport must be set for this callback";
335 poll_data = new SocketPollData{transport->curl_interface_,
336 transport->curl_multi_handle_,
337 transport,
339 transport->poll_data_map_.emplace(std::make_pair(easy, s), poll_data);
340 transport->curl_interface_->MultiAssign(
341 transport->curl_multi_handle_, s, poll_data);
348 transport->curl_interface_->MultiAssign(
349 transport->curl_multi_handle_, s, nullptr);
350 transport->poll_data_map_.erase(std::make_pair(easy, s));
394 int Transport::MultiTimerCallback(CURLM* /* multi */,
397 auto transport = static_cast<Transport*>(userp);
399 transport->weak_ptr_factory_for_timer_.InvalidateWeakPtrs();
403 base::Bind(&Transport::OnTimer,
404 transport->weak_ptr_factory_for_timer_.GetWeakPtr()),
410 void Transport::OnTimer() {
419 void Transport::ProcessAsyncCurlMessages() {
438 void Transport::OnTransferComplete(Connection* connection, CURLcode code) {
476 // maintains the lifetime of |connection| and possibly even this Transport
481 base::Bind(&Transport::CleanAsyncConnection,
486 void Transport::CleanAsyncConnection(Connection* connection) {
490 // reference to the Connection class and even possibly to this Transport.
510 // destroyed as the result. See the comment in Transport::OnTransferComplete.