Class: Vines::Config::ServerPort

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

Instance Attribute Summary

Attributes inherited from Port

#config, #settings, #stream

Instance Method Summary collapse

Methods inherited from Port

#max_stanza_size, #start

Methods included from Log

#log

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)
  @hosts, @stream = [], Vines::Stream::Server
  super(config, host, port, &block)
end

Instance Method Details

#hosts(*hosts) ⇒ Object



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

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