Class: Jaeger::UdpSender::Transport

Inherits:
Object
  • Object
show all
Defined in:
lib/jaeger/udp_sender/transport.rb

Constant Summary collapse

FLAGS =
0

Instance Method Summary collapse

Constructor Details

#initialize(host, port) ⇒ Transport

Returns a new instance of Transport.



8
9
10
11
12
13
# File 'lib/jaeger/udp_sender/transport.rb', line 8

def initialize(host, port)
  @socket = UDPSocket.new
  @host = host
  @port = port
  @buffer = ::Thrift::MemoryBufferTransport.new
end

Instance Method Details

#closeObject



26
# File 'lib/jaeger/udp_sender/transport.rb', line 26

def close; end

#flushObject



19
20
21
22
# File 'lib/jaeger/udp_sender/transport.rb', line 19

def flush
  data = @buffer.read(@buffer.available)
  send_bytes(data)
end

#openObject



24
# File 'lib/jaeger/udp_sender/transport.rb', line 24

def open; end

#write(str) ⇒ Object



15
16
17
# File 'lib/jaeger/udp_sender/transport.rb', line 15

def write(str)
  @buffer.write(str)
end