class

GRPC::Transport::Http2Connection

Inherits Reference < Object

Http2Connection wraps an nghttp2 session over any IO (plain TCP or TLS). Subclasses implement server-specific or client-specific logic.

Constants

HTTP2_CLIENT_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
RECV_BUFFER_SIZE = 65536

Constructors

new(socket : IO, peer_address : String = "unknown")
Source

Instance methods

close
Source
closed?
Source
on_begin_headers_cb(frame : Pointer(Void)) : Nil
Source
on_data_chunk_cb(stream_id : Int32, data : Pointer(UInt8), len : LibC::SizeT) : Nil
Source
on_frame_recv_cb(frame : Pointer(Void)) : Nil
Source
on_frame_send_cb(frame : Pointer(Void)) : Nil
Source
on_header_cb(frame : Pointer(Void), name : Pointer(UInt8), nlen : LibC::SizeT, value : Pointer(UInt8), vlen : LibC::SizeT) : Nil
Source
on_stream_close_cb(stream_id : Int32, error_code : UInt32) : Nil
Source
run_recv_loop

run_recv_loop reads from the socket and feeds data to nghttp2. Runs until the connection closes.

Source