Module: Daps::Server::Pipe

Defined in:
lib/daps/server.rb

Instance Method Summary collapse

Instance Method Details

#initialize(connection) ⇒ Object



69
70
71
72
# File 'lib/daps/server.rb', line 69

def initialize(connection)
  @connection = connection
  # super
end

#receive_data(data) ⇒ Object



74
75
76
# File 'lib/daps/server.rb', line 74

def receive_data(data)
  @connection.render data
end

#terminateObject



83
84
85
# File 'lib/daps/server.rb', line 83

def terminate
  Process.kill('INT', get_pid) rescue nil
end

#unbindObject



78
79
80
81
# File 'lib/daps/server.rb', line 78

def unbind
  @connection.render('')
  EM.next_tick{ @connection.finish }
end