Namespaces | Macros | Functions | Variables
binder_transport.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/substitute.h"
#include <grpc/support/log.h>
#include "src/core/ext/transport/binder/transport/binder_stream.h"
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"
#include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h"
#include "src/core/ext/transport/binder/wire_format/wire_reader.h"
#include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h"
#include "src/core/ext/transport/binder/wire_format/wire_writer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h"
Include dependency graph for binder_transport.cc:

Go to the source code of this file.

Namespaces

 grpc_binder
 

Macros

#define GRPC_BINDER_REF_TRANSPORT(t, r)   grpc_binder_ref_transport(t, r, __FILE__, __LINE__)
 
#define GRPC_BINDER_STREAM_REF(stream, reason)   grpc_binder_stream_ref(stream, reason)
 
#define GRPC_BINDER_STREAM_UNREF(stream, reason)   grpc_binder_stream_unref(stream, reason)
 
#define GRPC_BINDER_UNREF_TRANSPORT(t, r)   grpc_binder_unref_transport(t, r, __FILE__, __LINE__)
 

Functions

static void accept_stream_locked (void *gt, grpc_error_handle)
 
static void AssignMetadata (grpc_metadata_batch *mb, const grpc_binder::Metadata &md)
 
static void cancel_stream_locked (grpc_binder_transport *gbt, grpc_binder_stream *gbs, grpc_error_handle error)
 
static void close_transport_locked (grpc_binder_transport *gbt)
 
static bool ContainsAuthorityAndPath (const grpc_binder::Metadata &metadata)
 
static void destroy_stream (grpc_transport *, grpc_stream *gs, grpc_closure *then_schedule_closure)
 
static void destroy_stream_locked (void *sp, grpc_error_handle)
 
static void destroy_transport (grpc_transport *gt)
 
static void destroy_transport_locked (void *gt, grpc_error_handle)
 
static grpc_endpointget_endpoint (grpc_transport *)
 
static const grpc_transport_vtableget_vtable ()
 
static void grpc_binder_ref_transport (grpc_binder_transport *t, const char *reason, const char *file, int line)
 
static void grpc_binder_stream_ref (grpc_binder_stream *s, const char *reason)
 
static void grpc_binder_stream_unref (grpc_binder_stream *s, const char *reason)
 
static void grpc_binder_unref_transport (grpc_binder_transport *t, const char *reason, const char *file, int line)
 
grpc_transportgrpc_create_binder_transport_client (std::unique_ptr< grpc_binder::Binder > endpoint_binder, std::shared_ptr< grpc::experimental::binder::SecurityPolicy > security_policy)
 
grpc_transportgrpc_create_binder_transport_server (std::unique_ptr< grpc_binder::Binder > client_binder, std::shared_ptr< grpc::experimental::binder::SecurityPolicy > security_policy)
 
static int init_stream (grpc_transport *gt, grpc_stream *gs, grpc_stream_refcount *refcount, const void *server_data, grpc_core::Arena *arena)
 
static void perform_stream_op (grpc_transport *gt, grpc_stream *gs, grpc_transport_stream_op_batch *op)
 
static void perform_stream_op_locked (void *stream_op, grpc_error_handle)
 
static void perform_transport_op (grpc_transport *gt, grpc_transport_op *op)
 
static void perform_transport_op_locked (void *transport_op, grpc_error_handle)
 
static void recv_initial_metadata_locked (void *arg, grpc_error_handle)
 
static void recv_message_locked (void *arg, grpc_error_handle)
 
static void recv_trailing_metadata_locked (void *arg, grpc_error_handle)
 
static void register_stream_locked (void *arg, grpc_error_handle)
 
static void set_pollset (grpc_transport *gt, grpc_stream *gs, grpc_pollset *gp)
 
static void set_pollset_set (grpc_transport *, grpc_stream *, grpc_pollset_set *)
 

Variables

static const grpc_transport_vtable vtable
 

Macro Definition Documentation

◆ GRPC_BINDER_REF_TRANSPORT

#define GRPC_BINDER_REF_TRANSPORT (   t,
 
)    grpc_binder_ref_transport(t, r, __FILE__, __LINE__)

Definition at line 86 of file binder_transport.cc.

◆ GRPC_BINDER_STREAM_REF

#define GRPC_BINDER_STREAM_REF (   stream,
  reason 
)    grpc_binder_stream_ref(stream, reason)

Definition at line 82 of file binder_transport.cc.

◆ GRPC_BINDER_STREAM_UNREF

#define GRPC_BINDER_STREAM_UNREF (   stream,
  reason 
)    grpc_binder_stream_unref(stream, reason)

Definition at line 84 of file binder_transport.cc.

◆ GRPC_BINDER_UNREF_TRANSPORT

#define GRPC_BINDER_UNREF_TRANSPORT (   t,
 
)    grpc_binder_unref_transport(t, r, __FILE__, __LINE__)

Definition at line 88 of file binder_transport.cc.

Function Documentation

◆ accept_stream_locked()

static void accept_stream_locked ( void *  gt,
grpc_error_handle   
)
static

Definition at line 694 of file binder_transport.cc.

◆ AssignMetadata()

static void AssignMetadata ( grpc_metadata_batch mb,
const grpc_binder::Metadata md 
)
static

Definition at line 136 of file binder_transport.cc.

◆ cancel_stream_locked()

static void cancel_stream_locked ( grpc_binder_transport gbt,
grpc_binder_stream gbs,
grpc_error_handle  error 
)
static

Definition at line 149 of file binder_transport.cc.

◆ close_transport_locked()

static void close_transport_locked ( grpc_binder_transport gbt)
static

Definition at line 578 of file binder_transport.cc.

◆ ContainsAuthorityAndPath()

static bool ContainsAuthorityAndPath ( const grpc_binder::Metadata metadata)
static

Definition at line 185 of file binder_transport.cc.

◆ destroy_stream()

static void destroy_stream ( grpc_transport ,
grpc_stream gs,
grpc_closure then_schedule_closure 
)
static

Definition at line 646 of file binder_transport.cc.

◆ destroy_stream_locked()

static void destroy_stream_locked ( void *  sp,
grpc_error_handle   
)
static

Definition at line 636 of file binder_transport.cc.

◆ destroy_transport()

static void destroy_transport ( grpc_transport gt)
static

Definition at line 666 of file binder_transport.cc.

◆ destroy_transport_locked()

static void destroy_transport_locked ( void *  gt,
grpc_error_handle   
)
static

Definition at line 656 of file binder_transport.cc.

◆ get_endpoint()

static grpc_endpoint* get_endpoint ( grpc_transport )
static

Definition at line 674 of file binder_transport.cc.

◆ get_vtable()

static const grpc_transport_vtable* get_vtable ( )
static

Definition at line 692 of file binder_transport.cc.

◆ grpc_binder_ref_transport()

static void grpc_binder_ref_transport ( grpc_binder_transport t,
const char *  reason,
const char *  file,
int  line 
)
static

Definition at line 52 of file binder_transport.cc.

◆ grpc_binder_stream_ref()

static void grpc_binder_stream_ref ( grpc_binder_stream s,
const char *  reason 
)
static

Definition at line 45 of file binder_transport.cc.

◆ grpc_binder_stream_unref()

static void grpc_binder_stream_unref ( grpc_binder_stream s,
const char *  reason 
)
static

Definition at line 48 of file binder_transport.cc.

◆ grpc_binder_unref_transport()

static void grpc_binder_unref_transport ( grpc_binder_transport t,
const char *  reason,
const char *  file,
int  line 
)
static

Definition at line 57 of file binder_transport.cc.

◆ grpc_create_binder_transport_client()

grpc_transport* grpc_create_binder_transport_client ( std::unique_ptr< grpc_binder::Binder endpoint_binder,
std::shared_ptr< grpc::experimental::binder::SecurityPolicy security_policy 
)

Definition at line 737 of file binder_transport.cc.

◆ grpc_create_binder_transport_server()

grpc_transport* grpc_create_binder_transport_server ( std::unique_ptr< grpc_binder::Binder client_binder,
std::shared_ptr< grpc::experimental::binder::SecurityPolicy security_policy 
)

Definition at line 752 of file binder_transport.cc.

◆ init_stream()

static int init_stream ( grpc_transport gt,
grpc_stream gs,
grpc_stream_refcount refcount,
const void *  server_data,
grpc_core::Arena arena 
)
static

Definition at line 103 of file binder_transport.cc.

◆ perform_stream_op()

static void perform_stream_op ( grpc_transport gt,
grpc_stream gs,
grpc_transport_stream_op_batch op 
)
static

Definition at line 564 of file binder_transport.cc.

◆ perform_stream_op_locked()

static void perform_stream_op_locked ( void *  stream_op,
grpc_error_handle   
)
static

Definition at line 378 of file binder_transport.cc.

◆ perform_transport_op()

static void perform_transport_op ( grpc_transport gt,
grpc_transport_op op 
)
static

Definition at line 625 of file binder_transport.cc.

◆ perform_transport_op_locked()

static void perform_transport_op_locked ( void *  transport_op,
grpc_error_handle   
)
static

Definition at line 590 of file binder_transport.cc.

◆ recv_initial_metadata_locked()

static void recv_initial_metadata_locked ( void *  arg,
grpc_error_handle   
)
static

Definition at line 199 of file binder_transport.cc.

◆ recv_message_locked()

static void recv_message_locked ( void *  arg,
grpc_error_handle   
)
static

Definition at line 235 of file binder_transport.cc.

◆ recv_trailing_metadata_locked()

static void recv_trailing_metadata_locked ( void *  arg,
grpc_error_handle   
)
static

Definition at line 278 of file binder_transport.cc.

◆ register_stream_locked()

static void register_stream_locked ( void *  arg,
grpc_error_handle   
)
static

Definition at line 98 of file binder_transport.cc.

◆ set_pollset()

static void set_pollset ( grpc_transport gt,
grpc_stream gs,
grpc_pollset gp 
)
static

Definition at line 128 of file binder_transport.cc.

◆ set_pollset_set()

static void set_pollset_set ( grpc_transport ,
grpc_stream ,
grpc_pollset_set  
)
static

Definition at line 132 of file binder_transport.cc.

Variable Documentation

◆ init_md_

Metadata* const init_md_
private

Definition at line 372 of file binder_transport.cc.

◆ is_client_

const bool is_client_
private

Definition at line 370 of file binder_transport.cc.

◆ tx_

Transaction* const tx_
private

Definition at line 371 of file binder_transport.cc.

◆ vtable

get_endpoint
static grpc_endpoint * get_endpoint(grpc_transport *)
Definition: binder_transport.cc:674
set_pollset_set
static void set_pollset_set(grpc_transport *, grpc_stream *, grpc_pollset_set *)
Definition: binder_transport.cc:132
grpc_binder_stream
Definition: binder_stream.h:50
perform_stream_op
static void perform_stream_op(grpc_transport *gt, grpc_stream *gs, grpc_transport_stream_op_batch *op)
Definition: binder_transport.cc:564
destroy_transport
static void destroy_transport(grpc_transport *gt)
Definition: binder_transport.cc:666
init_stream
static int init_stream(grpc_transport *gt, grpc_stream *gs, grpc_stream_refcount *refcount, const void *server_data, grpc_core::Arena *arena)
Definition: binder_transport.cc:103
perform_transport_op
static void perform_transport_op(grpc_transport *gt, grpc_transport_op *op)
Definition: binder_transport.cc:625
destroy_stream
static void destroy_stream(grpc_transport *, grpc_stream *gs, grpc_closure *then_schedule_closure)
Definition: binder_transport.cc:646
set_pollset
static void set_pollset(grpc_transport *gt, grpc_stream *gs, grpc_pollset *gp)
Definition: binder_transport.cc:128


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