Class: Fluent::PluginHelper::Server::TLSCallbackSocket

Inherits:
CallbackSocket
  • Object
show all
Defined in:
lib/fluent/plugin_helper/server.rb

Constant Summary collapse

ENABLED_EVENTS =
[:data, :write_complete, :close]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CallbackSocket

#close, #close_after_write_complete, #data, #on, #remote_addr, #remote_host, #remote_port, #send

Constructor Details

#initialize(sock) ⇒ TLSCallbackSocket

Returns a new instance of TLSCallbackSocket.



481
482
483
484
485
# File 'lib/fluent/plugin_helper/server.rb', line 481

def initialize(sock)
  super("tls", sock, ENABLED_EVENTS)
  @peeraddr = (@sock.to_io.peeraddr rescue PEERADDR_FAILED)
  @buffer = ''
end

Instance Attribute Details

#bufferObject

Returns the value of attribute buffer.



479
480
481
# File 'lib/fluent/plugin_helper/server.rb', line 479

def buffer
  @buffer
end

Instance Method Details

#write(data) ⇒ Object



487
488
489
# File 'lib/fluent/plugin_helper/server.rb', line 487

def write(data)
  @sock.write(data)
end