pub struct GrpcTransport { /* private fields */ }Expand description
Unix socket-based gRPC transport.
Implementations§
Source§impl GrpcTransport
impl GrpcTransport
Sourcepub const DEFAULT_MAX_FRAME_SIZE: u32 = 16_384u32
pub const DEFAULT_MAX_FRAME_SIZE: u32 = 16_384u32
Default maximum HTTP/2 frame size (16 KiB).
Sourcepub const DEFAULT_WINDOW_SIZE: u32 = 65_535u32
pub const DEFAULT_WINDOW_SIZE: u32 = 65_535u32
Default window size (64 KiB).
Sourcepub fn socket_path(&self) -> &str
pub fn socket_path(&self) -> &str
Get the socket path.
Sourcepub fn next_stream(&mut self) -> u32
pub fn next_stream(&mut self) -> u32
Allocate the next client stream ID (always odd).
Sourcepub fn build_request_frame(&mut self, msg: &GrpcMessage) -> Http2Frame
pub fn build_request_frame(&mut self, msg: &GrpcMessage) -> Http2Frame
Build a DATA frame containing a gRPC-encoded message.
Sourcepub fn parse_response_frame(frame: &Http2Frame) -> Option<GrpcResponse>
pub fn parse_response_frame(frame: &Http2Frame) -> Option<GrpcResponse>
Parse a gRPC response from an HTTP/2 DATA frame.
Sourcepub fn window_size(&self) -> u32
pub fn window_size(&self) -> u32
Get the current window size.
Sourcepub fn update_window(&mut self, delta: u32)
pub fn update_window(&mut self, delta: u32)
Update window size by a delta.
Sourcepub fn consume_window(&mut self, amount: u32) -> bool
pub fn consume_window(&mut self, amount: u32) -> bool
Consume window for a send operation.