1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<B><CODE><PRE>
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
</PRE></CODE></B>
|