Class: GrpcKit::Calls::Server::ClientStreamer

Inherits:
Call
  • Object
show all
Defined in:
lib/grpc_kit/calls/server_client_streamer.rb

Instance Attribute Summary collapse

Attributes inherited from Call

#metadata, #method, #method_name, #service_name

Instance Method Summary collapse

Methods inherited from Call

#deadline, #normal_mode, #restrict_mode

Constructor Details

#initializeClientStreamer


11
12
13
14
15
16
# File 'lib/grpc_kit/calls/server_client_streamer.rb', line 11

def initialize(*)
  super

   = {}
   = {}
end

Instance Attribute Details

#outgoing_initial_metadataObject (readonly)

Returns the value of attribute outgoing_initial_metadata


8
9
10
# File 'lib/grpc_kit/calls/server_client_streamer.rb', line 8

def 
  
end

#outgoing_trailing_metadataObject (readonly)

Returns the value of attribute outgoing_trailing_metadata


8
9
10
# File 'lib/grpc_kit/calls/server_client_streamer.rb', line 8

def 
  
end

Instance Method Details

#recv(last: false) ⇒ Object


36
37
38
39
40
# File 'lib/grpc_kit/calls/server_client_streamer.rb', line 36

def recv(last: false)
  raise 'No method error' if @restrict

  @stream.recv_msg(@protobuf, last: last, limit_size: @config.max_receive_message_size)
end

#send_msg(data, last: false) ⇒ void


21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/grpc_kit/calls/server_client_streamer.rb', line 21

def send_msg(data, last: false)
  raise 'No method error' if @restrict

  @stream.send_msg(
    data,
    @protobuf,
    last: last,
    initial_metadata: ,
    trailing_metadata: ,
    limit_size: @config.max_send_message_size,
  )
end