Home | History | Annotate | Download | only in http

Lines Matching refs:Connection

31 // This is a class that stores connection data on particular CURL socket
79 // The socket file descriptor for the connection.
88 // connection.
93 // We store a connection here to make sure the object is alive for
95 std::shared_ptr<Connection> connection;
116 std::shared_ptr<http::Connection> Transport::CreateConnection(
123 std::shared_ptr<http::Connection> connection;
129 return connection;
193 return connection;
196 connection = std::make_shared<http::curl::Connection>(
198 if (!connection->SendHeaders(headers, error)) {
199 connection.reset();
201 return connection;
209 RequestID Transport::StartAsyncTransfer(http::Connection* connection,
221 auto curl_connection = static_cast<http::curl::Connection*>(connection);
228 request_data->connection =
229 std::static_pointer_cast<Connection>(curl_connection->shared_from_this());
234 // Add the connection's CURL handle to the multi-handle.
422 // Async I/O complete for a connection. Invoke the user callbacks.
423 Connection* connection = nullptr;
428 reinterpret_cast<void**>(&connection)));
429 CHECK(connection != nullptr);
430 OnTransferComplete(connection, msg->data.result);
435 void Transport::OnTransferComplete(Connection* connection, CURLcode code) {
436 auto p = async_requests_.find(connection);
437 CHECK(p != async_requests_.end()) << "Unknown connection";
450 LOG(INFO) << "Response: " << connection->GetResponseStatusCode() << " ("
451 << connection->GetResponseStatusText() << ")";
455 const auto& stream = request_data->connection->response_data_stream_;
462 std::unique_ptr<Response> resp{new Response{request_data->connection}};
470 // callback and we need to clean up the current connection, however the
471 // error callback has no reference to the connection itself and
473 // maintains the lifetime of |connection| and possibly even this Transport
476 // Instead, schedule an asynchronous task to clean up the connection.
480 connection));
483 void Transport::CleanAsyncConnection(Connection* connection) {
484 auto p = async_requests_.find(connection);
485 CHECK(p != async_requests_.end()) << "Unknown connection";
487 // reference to the Connection class and even possibly to this Transport.
493 // Remove the connection's CURL handle from multi-handle.
495 connection->curl_handle_);
497 // Remove all the socket data associated with this connection.
500 if (iter->first.first == connection->curl_handle_)