Class: Vines::Config::ServerPort

Inherits:
Port
  • Object
show all
Defined in:
lib/vines/config/port.rb

Instance Attribute Summary

Attributes inherited from Port

#config, #stream

Instance Method Summary collapse

Methods inherited from Port

#max_stanza_size, #start

Methods included from Log

#log, set_log_file

Constructor Details

#initialize(config, host = '0.0.0.0', port = 5269, &block) ⇒ ServerPort

Returns a new instance of ServerPort.



61
62
63
64
# File 'lib/vines/config/port.rb', line 61

def initialize(config, host='0.0.0.0', port=5269, &block)
  @blacklist, @stream = [], Vines::Stream::Server
  super(config, host, port, &block)
end

Instance Method Details

#blacklist(*blacklist) ⇒ Object



66
67
68
69
70
71
72
73
# File 'lib/vines/config/port.rb', line 66

def blacklist(*blacklist)
  if blacklist.any?
    @blacklist << blacklist
    @blacklist.flatten!
  else
    @blacklist
  end
end