`

    require 'quickfix_ruby'

    return if ARGV.length < 2

    fileName = ARGV[0]

    begin
    	settings = Quickfix::SessionSettings.new( fileName )
    	application = MyApplication.new
    	storeFactory = Quickfix::FileStoreFactory.new( settings )
    	logFactory = Quickfix::ScreenLogFactory.new( settings )
    	acceptor = Quickfix::SocketAcceptor.new( application, storeFactory, settings, logFactory )
    	acceptor.start()
    	# while condition == true: do something
    	acceptor.stop()
    rescue Quickfix::ConfigError => e
    	print e
    end

`