Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grpc_core::HttpRequest Class Referenceabstract

#include <httpcli.h>

Inheritance diagram for grpc_core::HttpRequest:
Inheritance graph
[legend]

Public Member Functions

 HttpRequest (URI uri, const grpc_slice &request_text, grpc_http_response *response, Timestamp deadline, const grpc_channel_args *channel_args, grpc_closure *on_done, grpc_polling_entity *pollent, const char *name, absl::optional< std::function< void()>> test_only_generate_response, RefCountedPtr< grpc_channel_credentials > channel_creds)
 
void Orphan () override
 
void Start ()
 
 ~HttpRequest () override
 
- Public Member Functions inherited from grpc_core::InternallyRefCounted< HttpRequest >
 InternallyRefCounted (const InternallyRefCounted &)=delete
 
InternallyRefCountedoperator= (const InternallyRefCounted &)=delete
 
- Public Member Functions inherited from grpc_core::Orphanable
Orphanableoperator= (const Orphanable &)=delete
 
 Orphanable (const Orphanable &)=delete
 

Static Public Member Functions

static OrphanablePtr< HttpRequestGet (URI uri, const grpc_channel_args *args, grpc_polling_entity *pollent, const grpc_http_request *request, Timestamp deadline, grpc_closure *on_done, grpc_http_response *response, RefCountedPtr< grpc_channel_credentials > channel_creds) GRPC_MUST_USE_RESULT
 
static OrphanablePtr< HttpRequestPost (URI uri, const grpc_channel_args *args, grpc_polling_entity *pollent, const grpc_http_request *request, Timestamp deadline, grpc_closure *on_done, grpc_http_response *response, RefCountedPtr< grpc_channel_credentials > channel_creds) GRPC_MUST_USE_RESULT
 
static OrphanablePtr< HttpRequestPut (URI uri, const grpc_channel_args *args, grpc_polling_entity *pollent, const grpc_http_request *request, Timestamp deadline, grpc_closure *on_done, grpc_http_response *response, RefCountedPtr< grpc_channel_credentials > channel_creds) GRPC_MUST_USE_RESULT
 
static void SetOverride (grpc_httpcli_get_override get, grpc_httpcli_post_override post, grpc_httpcli_put_override put)
 
static void TestOnlySetOnHandshakeDoneIntercept (void(*intercept)(HttpRequest *req))
 

Private Member Functions

RefCountedPtr< HandshakeManager > handshake_mgr_ ABSL_GUARDED_BY (mu_)
 
bool own_endpoint_ ABSL_GUARDED_BY (mu_)
 
bool cancelled_ ABSL_GUARDED_BY (mu_)
 
grpc_http_parser parser_ ABSL_GUARDED_BY (mu_)
 
std::vector< grpc_resolved_address > addresses_ ABSL_GUARDED_BY (mu_)
 
grpc_iomgr_object iomgr_obj_ ABSL_GUARDED_BY (mu_)
 
grpc_slice_buffer incoming_ ABSL_GUARDED_BY (mu_)
 
grpc_slice_buffer outgoing_ ABSL_GUARDED_BY (mu_)
 
grpc_error_handle overall_error_ ABSL_GUARDED_BY (mu_)
 
absl::optional< DNSResolver::TaskHandle > dns_request_handle_ ABSL_GUARDED_BY (mu_)
 
size_t next_address_ ABSL_GUARDED_BY (mu_)=0
 
int have_read_byte_ ABSL_GUARDED_BY (mu_)=0
 
void AppendError (grpc_error_handle error) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void DoHandshake (const grpc_resolved_address *addr) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void DoRead () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void Finish (grpc_error_handle error) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void NextAddress (grpc_error_handle error) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void OnReadInternal (grpc_error_handle error) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void OnResolved (absl::StatusOr< std::vector< grpc_resolved_address >> addresses_or)
 
void OnWritten () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void StartWrite () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 

Static Private Member Functions

static void ContinueDoneWriteAfterScheduleOnExecCtx (void *arg, grpc_error_handle error)
 
static void ContinueOnReadAfterScheduleOnExecCtx (void *user_data, grpc_error_handle error)
 
static void DoneWrite (void *arg, grpc_error_handle error)
 
static void OnHandshakeDone (void *arg, grpc_error_handle error)
 
static void OnRead (void *user_data, grpc_error_handle error)
 

Private Attributes

const grpc_channel_argschannel_args_
 
RefCountedPtr< grpc_channel_credentialschannel_creds_
 
grpc_closure continue_done_write_after_schedule_on_exec_ctx_
 
grpc_closure continue_on_read_after_schedule_on_exec_ctx_
 
const Timestamp deadline_
 
grpc_closure done_write_
 
grpc_endpointep_ = nullptr
 
Mutex mu_
 
grpc_closureon_done_
 
grpc_closure on_read_
 
grpc_polling_entitypollent_
 
grpc_pollset_setpollset_set_
 
const grpc_slice request_text_
 
ResourceQuotaRefPtr resource_quota_
 
const absl::optional< std::function< void()> > test_only_generate_response_
 
const URI uri_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::InternallyRefCounted< HttpRequest >
 InternallyRefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 
RefCountedPtr< HttpRequestRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< HttpRequestRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
 ~InternallyRefCounted () override=default
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 

Detailed Description

Definition at line 82 of file httpcli.h.

Constructor & Destructor Documentation

◆ HttpRequest()

grpc_core::HttpRequest::HttpRequest ( URI  uri,
const grpc_slice request_text,
grpc_http_response response,
Timestamp  deadline,
const grpc_channel_args channel_args,
grpc_closure on_done,
grpc_polling_entity pollent,
const char *  name,
absl::optional< std::function< void()>>  test_only_generate_response,
RefCountedPtr< grpc_channel_credentials channel_creds 
)

Definition at line 156 of file httpcli.cc.

◆ ~HttpRequest()

grpc_core::HttpRequest::~HttpRequest ( )
override

Definition at line 191 of file httpcli.cc.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/12]

RefCountedPtr<HandshakeManager> handshake_mgr_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/12]

bool own_endpoint_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/12]

bool cancelled_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [4/12]

grpc_http_parser parser_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [5/12]

std::vector<grpc_resolved_address> addresses_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [6/12]

grpc_iomgr_object iomgr_obj_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [7/12]

grpc_slice_buffer incoming_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [8/12]

grpc_slice_buffer outgoing_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [9/12]

grpc_error_handle overall_error_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [10/12]

absl::optional<DNSResolver::TaskHandle> dns_request_handle_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [11/12]

size_t next_address_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
privatepure virtual

◆ ABSL_GUARDED_BY() [12/12]

int have_read_byte_ grpc_core::HttpRequest::ABSL_GUARDED_BY ( mu_  )
privatepure virtual

◆ AppendError()

void grpc_core::HttpRequest::AppendError ( grpc_error_handle  error)
private

Definition at line 242 of file httpcli.cc.

◆ ContinueDoneWriteAfterScheduleOnExecCtx()

void grpc_core::HttpRequest::ContinueDoneWriteAfterScheduleOnExecCtx ( void *  arg,
grpc_error_handle  error 
)
staticprivate

Definition at line 280 of file httpcli.cc.

◆ ContinueOnReadAfterScheduleOnExecCtx()

static void grpc_core::HttpRequest::ContinueOnReadAfterScheduleOnExecCtx ( void *  user_data,
grpc_error_handle  error 
)
inlinestaticprivate

Definition at line 203 of file httpcli.h.

◆ DoHandshake()

void grpc_core::HttpRequest::DoHandshake ( const grpc_resolved_address addr)
private

Definition at line 328 of file httpcli.cc.

◆ DoneWrite()

static void grpc_core::HttpRequest::DoneWrite ( void *  arg,
grpc_error_handle  error 
)
inlinestaticprivate

Definition at line 215 of file httpcli.h.

◆ DoRead()

void grpc_core::HttpRequest::DoRead ( )
inlineprivate

Definition at line 189 of file httpcli.h.

◆ Finish()

void grpc_core::HttpRequest::Finish ( grpc_error_handle  error)
inlineprivate

Definition at line 182 of file httpcli.h.

◆ Get()

OrphanablePtr< HttpRequest > grpc_core::HttpRequest::Get ( URI  uri,
const grpc_channel_args args,
grpc_polling_entity pollent,
const grpc_http_request request,
Timestamp  deadline,
grpc_closure on_done,
grpc_http_response response,
RefCountedPtr< grpc_channel_credentials channel_creds 
)
static

Definition at line 69 of file httpcli.cc.

◆ NextAddress()

void grpc_core::HttpRequest::NextAddress ( grpc_error_handle  error)
private

Definition at line 372 of file httpcli.cc.

◆ OnHandshakeDone()

void grpc_core::HttpRequest::OnHandshakeDone ( void *  arg,
grpc_error_handle  error 
)
staticprivate

Definition at line 299 of file httpcli.cc.

◆ OnRead()

static void grpc_core::HttpRequest::OnRead ( void *  user_data,
grpc_error_handle  error 
)
inlinestaticprivate

Definition at line 195 of file httpcli.h.

◆ OnReadInternal()

void grpc_core::HttpRequest::OnReadInternal ( grpc_error_handle  error)
private

Definition at line 256 of file httpcli.cc.

◆ OnResolved()

void grpc_core::HttpRequest::OnResolved ( absl::StatusOr< std::vector< grpc_resolved_address >>  addresses_or)
private

Definition at line 390 of file httpcli.cc.

◆ OnWritten()

void grpc_core::HttpRequest::OnWritten ( )
inlineprivate

Definition at line 213 of file httpcli.h.

◆ Orphan()

void grpc_core::HttpRequest::Orphan ( )
overridevirtual

Implements grpc_core::Orphanable.

Definition at line 217 of file httpcli.cc.

◆ Post()

OrphanablePtr< HttpRequest > grpc_core::HttpRequest::Post ( URI  uri,
const grpc_channel_args args,
grpc_polling_entity pollent,
const grpc_http_request request,
Timestamp  deadline,
grpc_closure on_done,
grpc_http_response response,
RefCountedPtr< grpc_channel_credentials channel_creds 
)
static

Definition at line 95 of file httpcli.cc.

◆ Put()

OrphanablePtr< HttpRequest > grpc_core::HttpRequest::Put ( URI  uri,
const grpc_channel_args args,
grpc_polling_entity pollent,
const grpc_http_request request,
Timestamp  deadline,
grpc_closure on_done,
grpc_http_response response,
RefCountedPtr< grpc_channel_credentials channel_creds 
)
static

Definition at line 119 of file httpcli.cc.

◆ SetOverride()

void grpc_core::HttpRequest::SetOverride ( grpc_httpcli_get_override  get,
grpc_httpcli_post_override  post,
grpc_httpcli_put_override  put 
)
static

Definition at line 143 of file httpcli.cc.

◆ Start()

void grpc_core::HttpRequest::Start ( )

Definition at line 205 of file httpcli.cc.

◆ StartWrite()

void grpc_core::HttpRequest::StartWrite ( )
private

Definition at line 291 of file httpcli.cc.

◆ TestOnlySetOnHandshakeDoneIntercept()

void grpc_core::HttpRequest::TestOnlySetOnHandshakeDoneIntercept ( void(*)(HttpRequest *req intercept)
static

Definition at line 151 of file httpcli.cc.

Member Data Documentation

◆ channel_args_

const grpc_channel_args* grpc_core::HttpRequest::channel_args_
private

Definition at line 241 of file httpcli.h.

◆ channel_creds_

RefCountedPtr<grpc_channel_credentials> grpc_core::HttpRequest::channel_creds_
private

Definition at line 242 of file httpcli.h.

◆ continue_done_write_after_schedule_on_exec_ctx_

grpc_closure grpc_core::HttpRequest::continue_done_write_after_schedule_on_exec_ctx_
private

Definition at line 246 of file httpcli.h.

◆ continue_on_read_after_schedule_on_exec_ctx_

grpc_closure grpc_core::HttpRequest::continue_on_read_after_schedule_on_exec_ctx_
private

Definition at line 244 of file httpcli.h.

◆ deadline_

const Timestamp grpc_core::HttpRequest::deadline_
private

Definition at line 240 of file httpcli.h.

◆ done_write_

grpc_closure grpc_core::HttpRequest::done_write_
private

Definition at line 245 of file httpcli.h.

◆ ep_

grpc_endpoint* grpc_core::HttpRequest::ep_ = nullptr
private

Definition at line 247 of file httpcli.h.

◆ mu_

Mutex grpc_core::HttpRequest::mu_
private

Definition at line 253 of file httpcli.h.

◆ on_done_

grpc_closure* grpc_core::HttpRequest::on_done_
private

Definition at line 248 of file httpcli.h.

◆ on_read_

grpc_closure grpc_core::HttpRequest::on_read_
private

Definition at line 243 of file httpcli.h.

◆ pollent_

grpc_polling_entity* grpc_core::HttpRequest::pollent_
private

Definition at line 250 of file httpcli.h.

◆ pollset_set_

grpc_pollset_set* grpc_core::HttpRequest::pollset_set_
private

Definition at line 251 of file httpcli.h.

◆ request_text_

const grpc_slice grpc_core::HttpRequest::request_text_
private

Definition at line 239 of file httpcli.h.

◆ resource_quota_

ResourceQuotaRefPtr grpc_core::HttpRequest::resource_quota_
private

Definition at line 249 of file httpcli.h.

◆ test_only_generate_response_

const absl::optional<std::function<void()> > grpc_core::HttpRequest::test_only_generate_response_
private

Definition at line 252 of file httpcli.h.

◆ uri_

const URI grpc_core::HttpRequest::uri_
private

Definition at line 238 of file httpcli.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:36