1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<B><CODE><PRE>
import quickfix
if len(sys.argv) < 2: return
fileName = sys.argv[1]
try:
settings = quickfix.SessionSettings(fileName)
application = quickfix.MyApplication()
storeFactory = quickfix.FileStoreFactory(settings)
logFactory = quickfix.FileLogFactory(settings)
acceptor = quickfix.SocketAcceptor(application, storeFactory, settings, logFactory)
acceptor.start()
# while condition == true: do something
acceptor.stop()
except quickfix.ConfigError, e:
print e
</PRE></CODE></B>
|