Class: Msf::Ui::Web::Comm::SessionChannel

Inherits:
Channel
  • Object
show all
Defined in:
lib/msf/ui/web/comm.rb

Instance Attribute Summary

Attributes inherited from Channel

#id

Instance Method Summary collapse

Constructor Details

#initialize(session_id, pipe) ⇒ SessionChannel


21
22
23
24
25
26
27
28
# File 'lib/msf/ui/web/comm.rb', line 21

def initialize(session_id, pipe)
  super()

  @sid  = session_id
  @pipe = pipe

  @pipe.create_subscriber(channel.id)
end

Instance Method Details

#closeObject


30
31
32
# File 'lib/msf/ui/web/comm.rb', line 30

def close
  @pipe.remove_subscriber(channel.id)
end

#readObject


38
39
40
# File 'lib/msf/ui/web/comm.rb', line 38

def read
  @pipe.read_subscriber(channel.id)
end

#write_input(msg) ⇒ Object


34
35
36
# File 'lib/msf/ui/web/comm.rb', line 34

def write_input(msg)
  @pipe.write_input(msg)
end