Home | History | Annotate | Download | only in http

Lines Matching full:transport

34 class Transport::SocketPollData : public base::MessageLoopForIO::Watcher {
38 Transport* transport,
42 transport_(transport),
75 // CURL multi-handle associated with the transport.
77 // Transport object itself.
78 Transport* transport_;
89 struct Transport::AsyncRequestData {
100 Transport::Transport(const std::shared_ptr<CurlInterface>& curl_interface)
102 VLOG(2) << "curl::Transport created";
105 Transport::Transport(const std::shared_ptr<CurlInterface>& curl_interface,
108 VLOG(2) << "curl::Transport created with proxy " << proxy;
111 Transport::~Transport() {
113 VLOG(2) << "curl::Transport destroyed";
116 std::shared_ptr<http::Connection> Transport::CreateConnection(
204 void Transport::RunCallbackAsync(const tracked_objects::Location& from_here,
209 RequestID Transport::StartAsyncTransfer(http::Connection* connection,
250 bool Transport::CancelRequest(RequestID request_id) {
263 void Transport::SetDefaultTimeout(base::TimeDelta timeout) {
267 void Transport::AddEasyCurlError(brillo::ErrorPtr* error,
276 void Transport::AddMultiCurlError(brillo::ErrorPtr* error,
285 bool Transport::SetupAsyncCurl(brillo::ErrorPtr* error) {
298 curl_multi_handle_, &Transport::MultiSocketCallback, this);
301 curl_multi_handle_, &Transport::MultiTimerCallback, this);
310 void Transport::ShutDownAsyncCurl() {
314 << "There are pending requests at the time of transport's shutdown";
323 int Transport::MultiSocketCallback(CURL* easy,
328 auto transport = static_cast<Transport*>(userp);
329 CHECK(transport) << "Transport must be set for this callback";
333 poll_data = new SocketPollData{transport->curl_interface_,
334 transport->curl_multi_handle_,
335 transport,
337 transport->poll_data_map_.emplace(std::make_pair(easy, s), poll_data);
338 transport->curl_interface_->MultiAssign(
339 transport->curl_multi_handle_, s, poll_data);
346 transport->curl_interface_->MultiAssign(
347 transport->curl_multi_handle_, s, nullptr);
348 transport->poll_data_map_.erase(std::make_pair(easy, s));
391 int Transport::MultiTimerCallback(CURLM* /* multi */,
394 auto transport = static_cast<Transport*>(userp);
396 transport->weak_ptr_factory_for_timer_.InvalidateWeakPtrs();
400 base::Bind(&Transport::OnTimer,
401 transport->weak_ptr_factory_for_timer_.GetWeakPtr()),
407 void Transport::OnTimer() {
416 void Transport::ProcessAsyncCurlMessages() {
435 void Transport::OnTransferComplete(Connection* connection, CURLcode code) {
473 // maintains the lifetime of |connection| and possibly even this Transport
478 base::Bind(&Transport::CleanAsyncConnection,
483 void Transport::CleanAsyncConnection(Connection* connection) {
487 // reference to the Connection class and even possibly to this Transport.
507 // destroyed as the result. See the comment in Transport::OnTransferComplete.