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

Returns a new instance of SessionChannel.


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

def initialize(session_id, pipe)
  super()

  @sid  = session_id
  @pipe = pipe

  @pipe.create_subscriber(channel.id)
end

Instance Method Details

#closeObject


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

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

#readObject


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

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

#write_input(msg) ⇒ Object


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

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