class Vines::XmppServer

The main starting point for the XMPP server process. Starts the EventMachine processing loop and registers the XMPP protocol handler with the ports defined in the server configuration file.

Public Class Methods

new(config) click to toggle source
# File lib/vines/xmpp_server.rb, line 11
def initialize(config)
  @config = config
end

Public Instance Methods

start() click to toggle source
# File lib/vines/xmpp_server.rb, line 15
def start
  log.info('XMPP server started')
  at_exit { log.fatal('XMPP server stopped') }
  EM.epoll
  EM.kqueue
  EM.run do
    @config.ports.each {|port| port.start }
  end
end