class ElasticAPM::Transport::Connection::ProxyPipe
@api private
Attributes
read[R]
write[R]
Public Class Methods
new(enc = nil, compress: true)
click to toggle source
# File lib/elastic_apm/transport/connection/proxy_pipe.rb, line 10 def initialize(enc = nil, compress: true) rd, wr = IO.pipe(enc) @read = rd @write = Write.new(wr, compress: compress) # Http.rb<4 calls rewind on the request bodies, but IO::Pipe raises # ~mikker return if HTTP::VERSION.to_i >= 4 def rd.rewind; end end
pipe(*args)
click to toggle source
# File lib/elastic_apm/transport/connection/proxy_pipe.rb, line 67 def self.pipe(*args) pipe = new(*args) [pipe.read, pipe.write] end