Classes | Namespaces | Macros | Typedefs | Functions | Variables
transport.h File Reference
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <functional>
#include <string>
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/promise/arena_promise.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/promise/latch.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport_fwd.h"
Include dependency graph for transport.h:

Go to the source code of this file.

Classes

struct  grpc_core::CallArgs
 
struct  grpc_handler_private_op_data
 
struct  grpc_stream_refcount
 
struct  grpc_transport_one_way_stats
 
struct  grpc_transport_op
 
struct  grpc_transport_stream_op_batch
 
struct  grpc_transport_stream_op_batch_payload
 
struct  grpc_transport_stream_stats
 
class  grpc_core::MetadataHandle< T >
 

Namespaces

 grpc_core
 
 grpc_core::promise_filter_detail
 

Macros

#define GRPC_ARG_TRANSPORT   "grpc.internal.transport"
 
#define GRPC_PROTOCOL_VERSION_MAX_MAJOR   2
 
#define GRPC_PROTOCOL_VERSION_MAX_MINOR   1
 
#define GRPC_PROTOCOL_VERSION_MIN_MAJOR   2
 
#define GRPC_PROTOCOL_VERSION_MIN_MINOR   1
 
#define GRPC_STREAM_REF_INIT(rc, ir, cb, cb_arg, objtype)   grpc_stream_ref_init(rc, ir, cb, cb_arg, objtype)
 
#define GRPC_WRITE_INTERNAL_COMPRESS   (0x80000000u)
 
#define GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED   (0x40000000u)
 
#define GRPC_WRITE_INTERNAL_USED_MASK   (GRPC_WRITE_INTERNAL_COMPRESS | GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED)
 

Typedefs

using grpc_core::ClientMetadata = grpc_metadata_batch
 
using grpc_core::ClientMetadataHandle = MetadataHandle< ClientMetadata >
 
typedef struct grpc_stream grpc_stream
 
typedef struct grpc_stream_refcount grpc_stream_refcount
 
typedef struct grpc_transport_op grpc_transport_op
 
typedef struct grpc_transport_stream_op_batch_payload grpc_transport_stream_op_batch_payload
 
using grpc_core::NextPromiseFactory = std::function< ArenaPromise< ServerMetadataHandle >(CallArgs)>
 
using grpc_core::ServerMetadata = grpc_metadata_batch
 
using grpc_core::ServerMetadataHandle = MetadataHandle< ServerMetadata >
 

Functions

grpc_transport_opgrpc_make_transport_op (grpc_closure *on_complete)
 
grpc_transport_stream_op_batchgrpc_make_transport_stream_op (grpc_closure *on_complete)
 
grpc_slice grpc_slice_from_stream_owned_buffer (grpc_stream_refcount *refcount, void *buffer, size_t length)
 
void grpc_stream_destroy (grpc_stream_refcount *refcount)
 
void grpc_stream_ref (grpc_stream_refcount *refcount, const char *reason)
 
void grpc_stream_ref_init (grpc_stream_refcount *refcount, int initial_refs, grpc_iomgr_cb_func cb, void *cb_arg, const char *object_type)
 
void grpc_stream_unref (grpc_stream_refcount *refcount, const char *reason)
 
void grpc_transport_destroy (grpc_transport *transport)
 
void grpc_transport_destroy_stream (grpc_transport *transport, grpc_stream *stream, grpc_closure *then_schedule_closure)
 
grpc_endpointgrpc_transport_get_endpoint (grpc_transport *transport)
 
void grpc_transport_goaway (grpc_transport *transport, grpc_status_code status, grpc_slice debug_data)
 
int grpc_transport_init_stream (grpc_transport *transport, grpc_stream *stream, grpc_stream_refcount *refcount, const void *server_data, grpc_core::Arena *arena)
 
void grpc_transport_move_one_way_stats (grpc_transport_one_way_stats *from, grpc_transport_one_way_stats *to)
 
void grpc_transport_move_stats (grpc_transport_stream_stats *from, grpc_transport_stream_stats *to)
 
std::string grpc_transport_op_string (grpc_transport_op *op)
 
void grpc_transport_perform_op (grpc_transport *transport, grpc_transport_op *op)
 
void grpc_transport_perform_stream_op (grpc_transport *transport, grpc_stream *stream, grpc_transport_stream_op_batch *op)
 
void grpc_transport_ping (grpc_transport *transport, grpc_closure *cb)
 
void grpc_transport_set_pops (grpc_transport *transport, grpc_stream *stream, grpc_polling_entity *pollent)
 
void grpc_transport_stream_op_batch_finish_with_failure (grpc_transport_stream_op_batch *batch, grpc_error_handle error, grpc_core::CallCombiner *call_combiner)
 
void grpc_transport_stream_op_batch_queue_finish_with_failure (grpc_transport_stream_op_batch *batch, grpc_error_handle error, grpc_core::CallCombinerClosureList *closures)
 
std::string grpc_transport_stream_op_batch_string (grpc_transport_stream_op_batch *op)
 
size_t grpc_transport_stream_size (grpc_transport *transport)
 
bool grpc_core::IsStatusOk (const ServerMetadataHandle &m)
 

Variables

grpc_core::DebugOnlyTraceFlag grpc_trace_stream_refcount
 
constexpr const char * grpc_core::kKeepaliveThrottlingKey
 

Macro Definition Documentation

◆ GRPC_ARG_TRANSPORT

#define GRPC_ARG_TRANSPORT   "grpc.internal.transport"

Definition at line 71 of file transport.h.

◆ GRPC_PROTOCOL_VERSION_MAX_MAJOR

#define GRPC_PROTOCOL_VERSION_MAX_MAJOR   2

Definition at line 66 of file transport.h.

◆ GRPC_PROTOCOL_VERSION_MAX_MINOR

#define GRPC_PROTOCOL_VERSION_MAX_MINOR   1

Definition at line 67 of file transport.h.

◆ GRPC_PROTOCOL_VERSION_MIN_MAJOR

#define GRPC_PROTOCOL_VERSION_MIN_MAJOR   2

Definition at line 68 of file transport.h.

◆ GRPC_PROTOCOL_VERSION_MIN_MINOR

#define GRPC_PROTOCOL_VERSION_MIN_MINOR   1

Definition at line 69 of file transport.h.

◆ GRPC_STREAM_REF_INIT

#define GRPC_STREAM_REF_INIT (   rc,
  ir,
  cb,
  cb_arg,
  objtype 
)    grpc_stream_ref_init(rc, ir, cb, cb_arg, objtype)

Definition at line 190 of file transport.h.

◆ GRPC_WRITE_INTERNAL_COMPRESS

#define GRPC_WRITE_INTERNAL_COMPRESS   (0x80000000u)

Internal bit flag for grpc_begin_message's flags signaling the use of compression for the message. (Does not apply for stream compression.)

Definition at line 75 of file transport.h.

◆ GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED

#define GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED   (0x40000000u)

Internal bit flag for determining whether the message was compressed and had to be decompressed by the message_decompress filter. (Does not apply for stream compression.)

Definition at line 79 of file transport.h.

◆ GRPC_WRITE_INTERNAL_USED_MASK

#define GRPC_WRITE_INTERNAL_USED_MASK   (GRPC_WRITE_INTERNAL_COMPRESS | GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED)

Mask of all valid internal flags.

Definition at line 81 of file transport.h.

Typedef Documentation

◆ grpc_stream

typedef struct grpc_stream grpc_stream

Definition at line 174 of file transport.h.

◆ grpc_stream_refcount

◆ grpc_transport_op

Transport op: a set of operations to perform on a transport as a whole

◆ grpc_transport_stream_op_batch_payload

Definition at line 279 of file transport.h.

Function Documentation

◆ grpc_make_transport_op()

grpc_transport_op* grpc_make_transport_op ( grpc_closure on_complete)

Definition at line 205 of file transport.cc.

◆ grpc_make_transport_stream_op()

grpc_transport_stream_op_batch* grpc_make_transport_stream_op ( grpc_closure on_complete)

Definition at line 230 of file transport.cc.

◆ grpc_slice_from_stream_owned_buffer()

grpc_slice grpc_slice_from_stream_owned_buffer ( grpc_stream_refcount refcount,
void *  buffer,
size_t  length 
)

◆ grpc_stream_destroy()

void grpc_stream_destroy ( grpc_stream_refcount refcount)

Definition at line 36 of file transport.cc.

◆ grpc_stream_ref()

void grpc_stream_ref ( grpc_stream_refcount refcount,
const char *  reason 
)
inline

Definition at line 203 of file transport.h.

◆ grpc_stream_ref_init()

void grpc_stream_ref_init ( grpc_stream_refcount refcount,
int  initial_refs,
grpc_iomgr_cb_func  cb,
void *  cb_arg,
const char *  object_type 
)

Definition at line 59 of file transport.cc.

◆ grpc_stream_unref()

void grpc_stream_unref ( grpc_stream_refcount refcount,
const char *  reason 
)
inline

Definition at line 220 of file transport.h.

◆ grpc_transport_destroy()

void grpc_transport_destroy ( grpc_transport transport)

Definition at line 96 of file transport.cc.

◆ grpc_transport_destroy_stream()

void grpc_transport_destroy_stream ( grpc_transport transport,
grpc_stream stream,
grpc_closure then_schedule_closure 
)

Definition at line 134 of file transport.cc.

◆ grpc_transport_get_endpoint()

grpc_endpoint* grpc_transport_get_endpoint ( grpc_transport transport)

Definition at line 140 of file transport.cc.

◆ grpc_transport_goaway()

void grpc_transport_goaway ( grpc_transport transport,
grpc_status_code  status,
grpc_slice  debug_data 
)

◆ grpc_transport_init_stream()

int grpc_transport_init_stream ( grpc_transport transport,
grpc_stream stream,
grpc_stream_refcount refcount,
const void *  server_data,
grpc_core::Arena arena 
)

Definition at line 100 of file transport.cc.

◆ grpc_transport_move_one_way_stats()

void grpc_transport_move_one_way_stats ( grpc_transport_one_way_stats from,
grpc_transport_one_way_stats to 
)

Definition at line 79 of file transport.cc.

◆ grpc_transport_move_stats()

void grpc_transport_move_stats ( grpc_transport_stream_stats from,
grpc_transport_stream_stats to 
)

Definition at line 86 of file transport.cc.

◆ grpc_transport_op_string()

std::string grpc_transport_op_string ( grpc_transport_op op)

Definition at line 95 of file transport_op_string.cc.

◆ grpc_transport_perform_op()

void grpc_transport_perform_op ( grpc_transport transport,
grpc_transport_op op 
)

Definition at line 114 of file transport.cc.

◆ grpc_transport_perform_stream_op()

void grpc_transport_perform_stream_op ( grpc_transport transport,
grpc_stream stream,
grpc_transport_stream_op_batch op 
)

Definition at line 108 of file transport.cc.

◆ grpc_transport_ping()

void grpc_transport_ping ( grpc_transport transport,
grpc_closure cb 
)

◆ grpc_transport_set_pops()

void grpc_transport_set_pops ( grpc_transport transport,
grpc_stream stream,
grpc_polling_entity pollent 
)

Definition at line 119 of file transport.cc.

◆ grpc_transport_stream_op_batch_finish_with_failure()

void grpc_transport_stream_op_batch_finish_with_failure ( grpc_transport_stream_op_batch batch,
grpc_error_handle  error,
grpc_core::CallCombiner call_combiner 
)

Definition at line 151 of file transport.cc.

◆ grpc_transport_stream_op_batch_queue_finish_with_failure()

void grpc_transport_stream_op_batch_queue_finish_with_failure ( grpc_transport_stream_op_batch batch,
grpc_error_handle  error,
grpc_core::CallCombinerClosureList closures 
)

Definition at line 161 of file transport.cc.

◆ grpc_transport_stream_op_batch_string()

std::string grpc_transport_stream_op_batch_string ( grpc_transport_stream_op_batch op)

Definition at line 44 of file transport_op_string.cc.

◆ grpc_transport_stream_size()

size_t grpc_transport_stream_size ( grpc_transport transport)

Definition at line 92 of file transport.cc.

Variable Documentation

◆ grpc_trace_stream_refcount

grpc_core::DebugOnlyTraceFlag grpc_trace_stream_refcount


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