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.



462
463
464
465
466
# File 'lib/fluent/plugin_helper/server.rb', line 462

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.



460
461
462
# File 'lib/fluent/plugin_helper/server.rb', line 460

def buffer
  @buffer
end

Instance Method Details

#write(data) ⇒ Object



468
469
470
# File 'lib/fluent/plugin_helper/server.rb', line 468

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