nitcorn :: Interfaces :: defaultinit
# A list of interfaces with dynamic port listeners
class Interfaces
super Array[Interface]
# Back reference to the associtated `VirtualHost`
var virtual_host: VirtualHost
# Add an `Interface` described by `text` formatted as `interface.name.com:port`
fun add_from_string(text: String)
do
assert text.chars.count(':') <= 1
var words = text.split(':')
var name = words[0]
var port
if words.length > 1 then
port = words[1].to_i
else port = 80
add new Interface(name, port)
end
end
lib/nitcorn/server_config.nit:80,1--101,3