Class: Jaeger::UdpSender::Transport
- Inherits:
-
Object
- Object
- Jaeger::UdpSender::Transport
- Defined in:
- lib/jaeger/udp_sender/transport.rb
Constant Summary collapse
- FLAGS =
0
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize(host, port) ⇒ Transport
constructor
A new instance of Transport.
- #open ⇒ Object
- #write(str) ⇒ Object
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
#close ⇒ Object
26 |
# File 'lib/jaeger/udp_sender/transport.rb', line 26 def close; end |
#flush ⇒ Object
19 20 21 22 |
# File 'lib/jaeger/udp_sender/transport.rb', line 19 def flush data = @buffer.read(@buffer.available) send_bytes(data) end |
#open ⇒ Object
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 |