Module: Plug::UnixDomain

Defined in:
lib/rbkb/plug/unix_domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#muteObject

Returns the value of attribute mute.



33
34
35
# File 'lib/rbkb/plug/unix_domain.rb', line 33

def mute
  @mute
end

#peersObject

Returns the value of attribute peers.



33
34
35
# File 'lib/rbkb/plug/unix_domain.rb', line 33

def peers
  @peers
end

Instance Method Details

#initializeObject



35
36
37
# File 'lib/rbkb/plug/unix_domain.rb', line 35

def initialize
  @peers = PeerStub.new(self)
end

#nameObject



39
40
41
# File 'lib/rbkb/plug/unix_domain.rb', line 39

def name
  "a domain socket"
end

#receive_data(dat) ⇒ Object



43
44
45
# File 'lib/rbkb/plug/unix_domain.rb', line 43

def receive_data(dat)
  puts "Got:", dat.hexdump
end

#say(dat, sender) ⇒ Object



47
48
49
50
# File 'lib/rbkb/plug/unix_domain.rb', line 47

def say(dat, sender)
  UI.dump(sender.name, self.name, dat)
  send_data(dat)
end