Class: Fluent::PluginHelper::Server::TCPCallbackSocket

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

Instance Method Summary collapse

Methods inherited from CallbackSocket

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

Constructor Details

#initialize(sock) ⇒ TCPCallbackSocket

Returns a new instance of TCPCallbackSocket.



428
429
430
431
# File 'lib/fluent/plugin_helper/server.rb', line 428

def initialize(sock)
  super("tcp", sock, [:data, :write_complete, :close])
  @peeraddr = @sock.peeraddr
end

Instance Method Details

#write(data) ⇒ Object



433
434
435
# File 'lib/fluent/plugin_helper/server.rb', line 433

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