abstract class
GRPC::Transport::Http2Connection
- GRPC::Transport::Http2Connection
- Reference
- Object
Overview
Http2Connection wraps an nghttp2 session over any IO (plain TCP or TLS). Subclasses implement server-specific or client-specific logic.
Direct Known Subclasses
Defined in:
grpc/transport/http2_connection.crConstant Summary
-
HTTP2_CLIENT_PREFACE =
"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" -
RECV_BUFFER_SIZE =
65536
Constructors
Instance Method Summary
- #close : Nil
- #closed? : Bool
- #on_begin_headers_cb(frame : Pointer(Void)) : Nil
- #on_data_chunk_cb(stream_id : Int32, data : Pointer(UInt8), len : LibC::SizeT) : Nil
- #on_frame_recv_cb(frame : Pointer(Void)) : Nil
- #on_frame_send_cb(frame : Pointer(Void)) : Nil
- #on_header_cb(frame : Pointer(Void), name : Pointer(UInt8), nlen : LibC::SizeT, value : Pointer(UInt8), vlen : LibC::SizeT) : Nil
- #on_stream_close_cb(stream_id : Int32, error_code : UInt32) : Nil
-
#run_recv_loop : Nil
run_recv_loop reads from the socket and feeds data to nghttp2.
Constructor Detail
Instance Method Detail
def on_data_chunk_cb(stream_id : Int32, data : Pointer(UInt8), len : LibC::SizeT) : Nil
#
def on_header_cb(frame : Pointer(Void), name : Pointer(UInt8), nlen : LibC::SizeT, value : Pointer(UInt8), vlen : LibC::SizeT) : Nil
#
def run_recv_loop : Nil
#
run_recv_loop reads from the socket and feeds data to nghttp2. Runs until the connection closes.