Class: GrpcKit::Calls::Server::RequestResponse
- Inherits:
-
GrpcKit::Call
- Object
- GrpcKit::Call
- GrpcKit::Calls::Server::RequestResponse
- Defined in:
- lib/grpc_kit/calls/server_request_response.rb
Instance Attribute Summary collapse
-
#outgoing_initial_metadata ⇒ Object
readonly
Returns the value of attribute outgoing_initial_metadata.
-
#outgoing_trailing_metadata ⇒ Object
readonly
Returns the value of attribute outgoing_trailing_metadata.
Attributes inherited from GrpcKit::Call
#metadata, #method, #method_name, #service_name
Instance Method Summary collapse
-
#initialize ⇒ RequestResponse
constructor
A new instance of RequestResponse.
-
#recv ⇒ Object
Response object.
- #send_msg(data) ⇒ void
Methods inherited from GrpcKit::Call
Constructor Details
#initialize ⇒ RequestResponse
Returns a new instance of RequestResponse.
12 13 14 15 16 17 |
# File 'lib/grpc_kit/calls/server_request_response.rb', line 12 def initialize(**) super @outgoing_initial_metadata = {} @outgoing_trailing_metadata = {} end |
Instance Attribute Details
#outgoing_initial_metadata ⇒ Object (readonly)
Returns the value of attribute outgoing_initial_metadata.
9 10 11 |
# File 'lib/grpc_kit/calls/server_request_response.rb', line 9 def @outgoing_initial_metadata end |
#outgoing_trailing_metadata ⇒ Object (readonly)
Returns the value of attribute outgoing_trailing_metadata.
9 10 11 |
# File 'lib/grpc_kit/calls/server_request_response.rb', line 9 def @outgoing_trailing_metadata end |
Instance Method Details
#recv ⇒ Object
Returns response object.
34 35 36 |
# File 'lib/grpc_kit/calls/server_request_response.rb', line 34 def recv @stream.recv_msg(@codec, last: true, limit_size: @config.) end |
#send_msg(data) ⇒ void
This method returns an undefined value.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/grpc_kit/calls/server_request_response.rb', line 22 def send_msg(data) @stream.send_msg( data, @codec, last: true, initial_metadata: @outgoing_initial_metadata, trailing_metadata: @outgoing_trailing_metadata, limit_size: @config., ) end |