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
-
CLOSE_DRAIN_TIMEOUT =
100.milliseconds -
HTTP2_CLIENT_PREFACE =
"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" -
MAX_PENDING_OUTPUT =
256 * 1024 -
RECV_BUFFER_SIZE =
65536
Constructors
Instance Method Summary
- #close : Nil
- #closed? : Bool
-
#invoke_callback(& : -> Nil) : Int32
Do not unwind a Crystal exception through libnghttp2's C stack.
- #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 invoke_callback(& : -> Nil) : Int32
#
Do not unwind a Crystal exception through libnghttp2's C stack. The enclosing session operation will fail and tear down the connection.
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.