jspurefix 1.3.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -0
- package/README.md +5 -2
- package/appveyor.yml +3 -0
- package/data/session/genkey.ps1 +179 -0
- package/dist/a-session-msg-factory.d.ts +0 -0
- package/dist/a-session-msg-factory.js +1 -0
- package/dist/a-session-msg-factory.js.map +1 -0
- package/dist/ascii-encoder.test.d.ts +0 -0
- package/dist/ascii-encoder.test.js +1 -0
- package/dist/ascii-encoder.test.js.map +1 -0
- package/dist/ascii-parser.test.d.ts +0 -0
- package/dist/ascii-parser.test.js +1 -0
- package/dist/ascii-parser.test.js.map +1 -0
- package/dist/ascii-segment.test.d.ts +0 -0
- package/dist/ascii-segment.test.js +1 -0
- package/dist/ascii-segment.test.js.map +1 -0
- package/dist/ascii-store-replay.test.d.ts +0 -0
- package/dist/ascii-store-replay.test.js +1 -0
- package/dist/ascii-store-replay.test.js.map +1 -0
- package/dist/ascii-tag-pos.test.d.ts +0 -0
- package/dist/ascii-tag-pos.test.js +1 -0
- package/dist/ascii-tag-pos.test.js.map +1 -0
- package/dist/buffer/{ascii-chars.d.ts → ascii/ascii-chars.d.ts} +0 -0
- package/dist/buffer/{ascii-chars.js → ascii/ascii-chars.js} +0 -0
- package/dist/buffer/ascii/ascii-chars.js.map +1 -0
- package/dist/buffer/ascii/ascii-encoder.d.ts +5 -3
- package/dist/buffer/ascii/ascii-encoder.js +81 -47
- package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser-state.d.ts +3 -10
- package/dist/buffer/ascii/ascii-parser-state.js +37 -25
- package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser.d.ts +7 -7
- package/dist/buffer/ascii/ascii-parser.js +50 -24
- package/dist/buffer/ascii/ascii-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-segment-parser.d.ts +2 -2
- package/dist/buffer/ascii/ascii-segment-parser.js +34 -13
- package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-view.d.ts +2 -4
- package/dist/buffer/ascii/ascii-view.js +11 -15
- package/dist/buffer/ascii/ascii-view.js.map +1 -1
- package/dist/buffer/ascii/index.d.ts +1 -0
- package/dist/buffer/ascii/index.js +1 -0
- package/dist/buffer/ascii/index.js.map +1 -1
- package/dist/buffer/ascii/parse-state.d.ts +8 -0
- package/dist/buffer/ascii/parse-state.js +13 -0
- package/dist/buffer/ascii/parse-state.js.map +1 -0
- package/dist/buffer/ascii/time-formatter.js +1 -1
- package/dist/buffer/ascii/time-formatter.js.map +1 -1
- package/dist/buffer/elastic-buffer.js +28 -7
- package/dist/buffer/elastic-buffer.js.map +1 -1
- package/dist/buffer/encode-proxy.d.ts +1 -1
- package/dist/buffer/encode-proxy.js +16 -17
- package/dist/buffer/encode-proxy.js.map +1 -1
- package/dist/buffer/fixml/fixml-encoder.d.ts +2 -1
- package/dist/buffer/fixml/fixml-encoder.js +43 -20
- package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
- package/dist/buffer/fixml/fixml-parser.js +47 -24
- package/dist/buffer/fixml/fixml-parser.js.map +1 -1
- package/dist/buffer/fixml/fixml-view.d.ts +2 -2
- package/dist/buffer/fixml/fixml-view.js +13 -13
- package/dist/buffer/fixml/fixml-view.js.map +1 -1
- package/dist/buffer/fixml/populated-attributes.d.ts +5 -0
- package/dist/buffer/fixml/populated-attributes.js +3 -0
- package/dist/buffer/fixml/populated-attributes.js.map +1 -0
- package/dist/buffer/index.d.ts +4 -8
- package/dist/buffer/index.js +4 -8
- package/dist/buffer/index.js.map +1 -1
- package/dist/buffer/msg-encoder.d.ts +2 -1
- package/dist/buffer/msg-encoder.js.map +1 -1
- package/dist/buffer/msg-view.d.ts +3 -3
- package/dist/buffer/msg-view.js +8 -5
- package/dist/buffer/msg-view.js.map +1 -1
- package/dist/buffer/segment/segment-description.d.ts +26 -0
- package/dist/buffer/segment/segment-description.js +72 -0
- package/dist/buffer/segment/segment-description.js.map +1 -0
- package/dist/buffer/segment/segment-summary.d.ts +13 -0
- package/dist/buffer/segment/segment-summary.js +20 -0
- package/dist/buffer/segment/segment-summary.js.map +1 -0
- package/dist/buffer/segment/segment-type.d.ts +8 -0
- package/dist/buffer/segment/segment-type.js +13 -0
- package/dist/buffer/segment/segment-type.js.map +1 -0
- package/dist/buffer/segment-description.d.ts +2 -9
- package/dist/buffer/segment-description.js +5 -13
- package/dist/buffer/segment-description.js.map +1 -1
- package/dist/buffer/segment-type.d.ts +8 -0
- package/dist/buffer/segment-type.js +13 -0
- package/dist/buffer/segment-type.js.map +1 -0
- package/dist/buffer/structure.d.ts +3 -3
- package/dist/buffer/structure.js +1 -1
- package/dist/buffer/structure.js.map +1 -1
- package/dist/buffer/tag/tag-pos.d.ts +12 -0
- package/dist/buffer/tag/tag-pos.js +55 -0
- package/dist/buffer/tag/tag-pos.js.map +1 -0
- package/dist/buffer/tag/tag-type.d.ts +13 -0
- package/dist/buffer/tag/tag-type.js +18 -0
- package/dist/buffer/tag/tag-type.js.map +1 -0
- package/dist/buffer/tag/tags.d.ts +21 -0
- package/dist/buffer/tag/tags.js +122 -0
- package/dist/buffer/tag/tags.js.map +1 -0
- package/dist/buffer/tag-type.d.ts +13 -0
- package/dist/buffer/tag-type.js +18 -0
- package/dist/buffer/tag-type.js.map +1 -0
- package/dist/buffer/tags.d.ts +3 -14
- package/dist/buffer/tags.js +23 -36
- package/dist/buffer/tags.js.map +1 -1
- package/dist/config/get-js-fx-logger.d.ts +4 -0
- package/dist/{transport/make-fixl-session.js → config/get-js-fx-logger.js} +1 -1
- package/dist/config/get-js-fx-logger.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/js-fix-config.d.ts +4 -1
- package/dist/config/js-fix-config.js +3 -3
- package/dist/config/js-fix-config.js.map +1 -1
- package/dist/config/js-fix-logger.d.ts +0 -3
- package/dist/config/js-fix-logger.js.map +1 -1
- package/dist/dict-parser.js +29 -24
- package/dist/dict-parser.js.map +1 -1
- package/dist/dictionary/compiler/compiler-type.js +7 -7
- package/dist/dictionary/compiler/compiler-type.js.map +1 -1
- package/dist/dictionary/compiler/enum-compiler.d.ts +1 -0
- package/dist/dictionary/compiler/enum-compiler.js +11 -1
- package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
- package/dist/dictionary/compiler/msg-compiler.js +8 -6
- package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
- package/dist/dictionary/contained/contained-component-field.js +2 -1
- package/dist/dictionary/contained/contained-component-field.js.map +1 -1
- package/dist/dictionary/contained/contained-field-dispatch.d.ts +1 -14
- package/dist/dictionary/contained/contained-field-dispatch.js +4 -4
- package/dist/dictionary/contained/contained-field-dispatch.js.map +1 -1
- package/dist/dictionary/contained/contained-field-dispatcher.d.ts +14 -0
- package/dist/dictionary/contained/contained-field-dispatcher.js +3 -0
- package/dist/dictionary/contained/contained-field-dispatcher.js.map +1 -0
- package/dist/dictionary/contained/contained-field-set.d.ts +1 -1
- package/dist/dictionary/contained/contained-field-set.js +12 -11
- package/dist/dictionary/contained/contained-field-set.js.map +1 -1
- package/dist/dictionary/contained/contained-field-type.d.ts +5 -0
- package/dist/dictionary/contained/contained-field-type.js +10 -0
- package/dist/dictionary/contained/contained-field-type.js.map +1 -0
- package/dist/dictionary/contained/contained-field.d.ts +1 -5
- package/dist/dictionary/contained/contained-field.js +1 -7
- package/dist/dictionary/contained/contained-field.js.map +1 -1
- package/dist/dictionary/contained/contained-group-field.js +2 -1
- package/dist/dictionary/contained/contained-group-field.js.map +1 -1
- package/dist/dictionary/contained/contained-simple-field.js +2 -1
- package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
- package/dist/dictionary/{fields-dispatch.d.ts → contained/field-dispatcher.d.ts} +3 -2
- package/dist/dictionary/contained/field-dispatcher.js +3 -0
- package/dist/dictionary/contained/field-dispatcher.js.map +1 -0
- package/dist/dictionary/contained/fields-dispatch.d.ts +6 -0
- package/dist/dictionary/contained/fields-dispatch.js +42 -0
- package/dist/dictionary/contained/fields-dispatch.js.map +1 -0
- package/dist/dictionary/contained/index.d.ts +2 -0
- package/dist/dictionary/contained/index.js +2 -0
- package/dist/dictionary/contained/index.js.map +1 -1
- package/dist/dictionary/contained-set-type.d.ts +5 -0
- package/dist/dictionary/contained-set-type.js +10 -0
- package/dist/dictionary/contained-set-type.js.map +1 -0
- package/dist/dictionary/definition/component-field-definition.js +2 -2
- package/dist/dictionary/definition/component-field-definition.js.map +1 -1
- package/dist/dictionary/definition/fix-definitions.d.ts +2 -1
- package/dist/dictionary/definition/fix-definitions.js.map +1 -1
- package/dist/dictionary/definition/group-field-definition.js +2 -2
- package/dist/dictionary/definition/group-field-definition.js.map +1 -1
- package/dist/dictionary/definition/index.d.ts +0 -1
- package/dist/dictionary/definition/index.js +0 -1
- package/dist/dictionary/definition/index.js.map +1 -1
- package/dist/dictionary/definition/message-definition.js +2 -2
- package/dist/dictionary/definition/message-definition.js.map +1 -1
- package/dist/dictionary/definition/simple-field-definition.d.ts +1 -1
- package/dist/dictionary/definition/simple-field-definition.js +5 -4
- package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
- package/dist/dictionary/dict-primitive.d.ts +0 -11
- package/dist/dictionary/dict-primitive.js +0 -7
- package/dist/dictionary/dict-primitive.js.map +1 -1
- package/dist/dictionary/fix-definition-source.d.ts +6 -0
- package/dist/dictionary/fix-definition-source.js +11 -0
- package/dist/dictionary/fix-definition-source.js.map +1 -0
- package/dist/dictionary/fix-versions.d.ts +0 -9
- package/dist/dictionary/fix-versions.js +1 -39
- package/dist/dictionary/fix-versions.js.map +1 -1
- package/dist/dictionary/index.d.ts +1 -5
- package/dist/dictionary/index.js +1 -5
- package/dist/dictionary/index.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/base-parser.d.ts +2 -4
- package/dist/dictionary/parser/fix-repository/base-parser.js +1 -2
- package/dist/dictionary/parser/fix-repository/base-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/components-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/components-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/components-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/data-types-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/data-types-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/data-types-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/enums-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/enums-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/enums-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/fields-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/fields-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/fields-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/messages-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/messages-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/messages-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.d.ts +5 -0
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-component.d.ts +10 -0
- package/dist/dictionary/parser/fix-repository/repository-component.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-component.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.d.ts +6 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.d.ts +7 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-field.d.ts +11 -0
- package/dist/dictionary/parser/fix-repository/repository-field.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-field.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-message.d.ts +11 -0
- package/dist/dictionary/parser/fix-repository/repository-message.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-message.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.d.ts +9 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.d.ts +0 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.js +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-type.d.ts +0 -53
- package/dist/dictionary/parser/fix-repository/repository-type.js +0 -2
- package/dist/dictionary/parser/fix-repository/repository-type.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js +9 -9
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository.d.ts +12 -1
- package/dist/dictionary/parser/fix-repository/repository.js +50 -28
- package/dist/dictionary/parser/fix-repository/repository.js.map +1 -1
- package/dist/dictionary/parser/fixml/components-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/components-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/fields-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/fields-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/fix-xsd-parser.js +3 -2
- package/dist/dictionary/parser/fixml/fix-xsd-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/include-graph.js.map +1 -1
- package/dist/dictionary/parser/fixml/xsd-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/xsd-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-definition-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/field-definition-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-set-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/field-set-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/field-set-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/message-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/message-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/node-parser.d.ts +4 -5
- package/dist/dictionary/parser/quickfix/node-parser.js +4 -4
- package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/parse-state.d.ts +8 -0
- package/dist/dictionary/parser/quickfix/parse-state.js +13 -0
- package/dist/dictionary/parser/quickfix/parse-state.js.map +1 -0
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.d.ts +1 -9
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +27 -34
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
- package/dist/dictionary/sax-node.d.ts +6 -0
- package/dist/dictionary/sax-node.js +3 -0
- package/dist/dictionary/sax-node.js.map +1 -0
- package/dist/dictionary/set-reduce.d.ts +5 -12
- package/dist/dictionary/set-reduce.js +28 -26
- package/dist/dictionary/set-reduce.js.map +1 -1
- package/dist/dictionary/type-dispatcher.d.ts +12 -0
- package/dist/dictionary/type-dispatcher.js +3 -0
- package/dist/dictionary/type-dispatcher.js.map +1 -0
- package/dist/dictionary/version-util.d.ts +4 -0
- package/dist/dictionary/version-util.js +36 -0
- package/dist/dictionary/version-util.js.map +1 -0
- package/dist/execution-report.test.d.ts +0 -0
- package/dist/execution-report.test.js +1 -0
- package/dist/execution-report.test.js.map +1 -0
- package/dist/experiment.d.ts +0 -0
- package/dist/experiment.js +1 -0
- package/dist/experiment.js.map +1 -0
- package/dist/fix-repo-dict.test.d.ts +0 -0
- package/dist/fix-repo-dict.test.js +1 -0
- package/dist/fix-repo-dict.test.js.map +1 -0
- package/dist/fix-session-state-args.d.ts +0 -0
- package/dist/fix-session-state-args.js +1 -0
- package/dist/fix-session-state-args.js.map +1 -0
- package/dist/fix-session-state.d.ts +0 -0
- package/dist/fix-session-state.js +1 -0
- package/dist/fix-session-state.js.map +1 -0
- package/dist/fix-session.d.ts +0 -0
- package/dist/fix-session.js +1 -0
- package/dist/fix-session.js.map +1 -0
- package/dist/fix.txt +1 -0
- package/dist/fixml-alloc-parse.test.d.ts +0 -0
- package/dist/fixml-alloc-parse.test.js +1 -0
- package/dist/fixml-alloc-parse.test.js.map +1 -0
- package/dist/fixml-mkt-data-fut-parse.test.d.ts +0 -0
- package/dist/fixml-mkt-data-fut-parse.test.js +1 -0
- package/dist/fixml-mkt-data-fut-parse.test.js.map +1 -0
- package/dist/fixml-mkt-data-settle-parse.test.d.ts +0 -0
- package/dist/fixml-mkt-data-settle-parse.test.js +1 -0
- package/dist/fixml-mkt-data-settle-parse.test.js.map +1 -0
- package/dist/fixml-tc-bi-lateral-parse.test.d.ts +0 -0
- package/dist/fixml-tc-bi-lateral-parse.test.js +1 -0
- package/dist/fixml-tc-bi-lateral-parse.test.js.map +1 -0
- package/dist/includes.test.d.ts +0 -0
- package/dist/includes.test.js +1 -0
- package/dist/includes.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jsfix-cmd.d.ts +5 -0
- package/dist/jsfix-cmd.js +27 -20
- package/dist/jsfix-cmd.js.map +1 -1
- package/dist/launcher.d.ts +0 -0
- package/dist/launcher.js +1 -0
- package/dist/launcher.js.map +1 -0
- package/dist/logon.test.d.ts +0 -0
- package/dist/logon.test.js +1 -0
- package/dist/logon.test.js.map +1 -0
- package/dist/make-fix-session.d.ts +0 -0
- package/dist/make-fix-session.js +1 -0
- package/dist/make-fix-session.js.map +1 -0
- package/dist/memory-store.test.d.ts +0 -0
- package/dist/memory-store.test.js +1 -0
- package/dist/memory-store.test.js.map +1 -0
- package/dist/object.json +691 -0
- package/dist/qf-full-msg.test.d.ts +0 -0
- package/dist/qf-full-msg.test.js +1 -0
- package/dist/qf-full-msg.test.js.map +1 -0
- package/dist/repo-full-ascii-msg.test.d.ts +0 -0
- package/dist/repo-full-ascii-msg.test.js +1 -0
- package/dist/repo-full-ascii-msg.test.js.map +1 -0
- package/dist/runtime/DITokens.d.ts +20 -0
- package/dist/runtime/DITokens.js +25 -0
- package/dist/runtime/DITokens.js.map +1 -0
- package/dist/runtime/app-launcher.d.ts +27 -0
- package/dist/runtime/app-launcher.js +131 -0
- package/dist/runtime/app-launcher.js.map +1 -0
- package/dist/runtime/di-tokens.d.ts +28 -0
- package/dist/runtime/di-tokens.js +33 -0
- package/dist/runtime/di-tokens.js.map +1 -0
- package/dist/runtime/engine-factory.d.ts +4 -0
- package/dist/runtime/engine-factory.js +3 -0
- package/dist/runtime/engine-factory.js.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +18 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/launcher.d.ts +29 -0
- package/dist/runtime/launcher.js +131 -0
- package/dist/runtime/launcher.js.map +1 -0
- package/dist/runtime/make-config.d.ts +11 -0
- package/dist/runtime/make-config.js +57 -0
- package/dist/runtime/make-config.js.map +1 -0
- package/dist/runtime/session-container.d.ts +16 -0
- package/dist/runtime/session-container.js +168 -0
- package/dist/runtime/session-container.js.map +1 -0
- package/dist/runtime/session-launcher.d.ts +27 -0
- package/dist/runtime/session-launcher.js +131 -0
- package/dist/runtime/session-launcher.js.map +1 -0
- package/dist/sample/http/oms/app.d.ts +1 -1
- package/dist/sample/http/oms/app.js +16 -14
- package/dist/sample/http/oms/app.js.map +1 -1
- package/dist/sample/http/oms/http-client.js +22 -2
- package/dist/sample/http/oms/http-client.js.map +1 -1
- package/dist/sample/http/oms/http-server.js +21 -2
- package/dist/sample/http/oms/http-server.js.map +1 -1
- package/dist/sample/launcher.d.ts +21 -4
- package/dist/sample/launcher.js +87 -19
- package/dist/sample/launcher.js.map +1 -1
- package/dist/sample/tcp/qf-md/app.d.ts +1 -1
- package/dist/sample/tcp/qf-md/app.js +11 -11
- package/dist/sample/tcp/qf-md/app.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-client.js +21 -2
- package/dist/sample/tcp/qf-md/md-client.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-server.js +20 -2
- package/dist/sample/tcp/qf-md/md-server.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/app.d.ts +1 -1
- package/dist/sample/tcp/recovering-skeleton/app.js +36 -16
- package/dist/sample/tcp/recovering-skeleton/app.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.d.ts +3 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +30 -8
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.d.ts +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js +22 -3
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js +21 -2
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js.map +1 -1
- package/dist/sample/tcp/skeleton/app.d.ts +1 -1
- package/dist/sample/tcp/skeleton/app.js +8 -13
- package/dist/sample/tcp/skeleton/app.js.map +1 -1
- package/dist/sample/tcp/skeleton/skeleton-session.d.ts +5 -1
- package/dist/sample/tcp/skeleton/skeleton-session.js +45 -4
- package/dist/sample/tcp/skeleton/skeleton-session.js.map +1 -1
- package/dist/sample/tcp/tls-trade-capture/app.d.ts +1 -1
- package/dist/sample/tcp/tls-trade-capture/app.js +4 -24
- package/dist/sample/tcp/tls-trade-capture/app.js.map +1 -1
- package/dist/sample/tcp/trade-capture/app-launcher.d.ts +6 -0
- package/dist/sample/tcp/trade-capture/app-launcher.js +21 -0
- package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -0
- package/dist/sample/tcp/trade-capture/app-launher.d.ts +0 -0
- package/dist/sample/tcp/trade-capture/app-launher.js +1 -0
- package/dist/sample/tcp/trade-capture/app-launher.js.map +1 -0
- package/dist/sample/tcp/trade-capture/app.d.ts +1 -1
- package/dist/sample/tcp/trade-capture/app.js +4 -21
- package/dist/sample/tcp/trade-capture/app.js.map +1 -1
- package/dist/sample/tcp/trade-capture/jsfix.test_client.txt +11 -0
- package/dist/sample/tcp/trade-capture/jsfix.test_server.txt +10 -0
- package/dist/sample/tcp/trade-capture/trade-capture-client.d.ts +1 -0
- package/dist/sample/tcp/trade-capture/trade-capture-client.js +7 -3
- package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-factory.js +7 -1
- package/dist/sample/tcp/trade-capture/trade-factory.js.map +1 -1
- package/dist/segment-description.d.ts +0 -0
- package/dist/segment-description.js +1 -0
- package/dist/segment-description.js.map +1 -0
- package/dist/segment-summary.d.ts +0 -0
- package/dist/segment-summary.js +1 -0
- package/dist/segment-summary.js.map +1 -0
- package/dist/segment-type.d.ts +0 -0
- package/dist/segment-type.js +1 -0
- package/dist/segment-type.js.map +1 -0
- package/dist/session-description.d.ts +0 -0
- package/dist/session-description.js +1 -0
- package/dist/session-description.js.map +1 -0
- package/dist/session-msg-factory.d.ts +0 -0
- package/dist/session-msg-factory.js +1 -0
- package/dist/session-msg-factory.js.map +1 -0
- package/dist/session-state.d.ts +0 -0
- package/dist/session-state.js +1 -0
- package/dist/session-state.js.map +1 -0
- package/dist/session-state.test.d.ts +0 -0
- package/dist/session-state.test.js +1 -0
- package/dist/session-state.test.js.map +1 -0
- package/dist/session.test.d.ts +0 -0
- package/dist/session.test.js +1 -0
- package/dist/session.test.js.map +1 -0
- package/dist/setup.d.ts +0 -0
- package/dist/setup.js +1 -0
- package/dist/setup.js.map +1 -0
- package/dist/skeleton-runner.d.ts +0 -0
- package/dist/skeleton-runner.js +1 -0
- package/dist/skeleton-runner.js.map +1 -0
- package/dist/store/fix-msg-ascii-store-resend.d.ts +1 -1
- package/dist/store/fix-msg-ascii-store-resend.js +5 -3
- package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
- package/dist/store/fix-msg-memory-store.d.ts +1 -1
- package/dist/store/fix-msg-memory-store.js.map +1 -1
- package/dist/store/fix-msg-store-record.d.ts +2 -0
- package/dist/store/fix-msg-store-record.js +4 -0
- package/dist/store/fix-msg-store-record.js.map +1 -1
- package/dist/store/fix-msg-store-state.d.ts +6 -0
- package/dist/store/fix-msg-store-state.js +3 -0
- package/dist/store/fix-msg-store-state.js.map +1 -0
- package/dist/store/fix-msg-store.d.ts +1 -6
- package/dist/store/fix-msg-store.js.map +1 -1
- package/dist/structure.json +631 -0
- package/dist/tag-pos.d.ts +0 -0
- package/dist/tag-pos.js +1 -0
- package/dist/tag-pos.js.map +1 -0
- package/dist/tag-type.d.ts +0 -0
- package/dist/tag-type.js +1 -0
- package/dist/tag-type.js.map +1 -0
- package/dist/tags.d.ts +0 -0
- package/dist/tags.js +1 -0
- package/dist/tags.js.map +1 -0
- package/dist/test/ascii/ascii-encoder.test.d.ts +1 -0
- package/dist/test/ascii/ascii-encoder.test.js +507 -0
- package/dist/test/ascii/ascii-encoder.test.js.map +1 -0
- package/dist/test/ascii/ascii-parser.test.d.ts +1 -0
- package/dist/test/ascii/ascii-parser.test.js +123 -0
- package/dist/test/ascii/ascii-parser.test.js.map +1 -0
- package/dist/test/ascii/ascii-segment.test.d.ts +1 -0
- package/dist/test/ascii/ascii-segment.test.js +86 -0
- package/dist/test/ascii/ascii-segment.test.js.map +1 -0
- package/dist/test/ascii/ascii-store-replay.test.d.ts +1 -0
- package/dist/test/ascii/ascii-store-replay.test.js +92 -0
- package/dist/test/ascii/ascii-store-replay.test.js.map +1 -0
- package/dist/test/ascii/ascii-tag-pos.test.d.ts +1 -0
- package/dist/test/ascii/ascii-tag-pos.test.js +105 -0
- package/dist/test/ascii/ascii-tag-pos.test.js.map +1 -0
- package/dist/test/ascii/execution-report.test.d.ts +1 -0
- package/dist/test/ascii/execution-report.test.js +489 -0
- package/dist/test/ascii/execution-report.test.js.map +1 -0
- package/dist/test/ascii/fix-log-replay.test.d.ts +1 -0
- package/dist/test/ascii/fix-log-replay.test.js +47 -0
- package/dist/test/ascii/fix-log-replay.test.js.map +1 -0
- package/dist/test/ascii/fix-repo-dict.test.d.ts +1 -0
- package/dist/test/ascii/fix-repo-dict.test.js +128 -0
- package/dist/test/ascii/fix-repo-dict.test.js.map +1 -0
- package/dist/test/ascii/includes.test.d.ts +1 -0
- package/dist/test/ascii/includes.test.js +43 -0
- package/dist/test/ascii/includes.test.js.map +1 -0
- package/dist/test/ascii/logon.test.d.ts +1 -0
- package/dist/test/ascii/logon.test.js +91 -0
- package/dist/test/ascii/logon.test.js.map +1 -0
- package/dist/test/ascii/memory-store.test.d.ts +1 -0
- package/dist/test/ascii/memory-store.test.js +75 -0
- package/dist/test/ascii/memory-store.test.js.map +1 -0
- package/dist/test/ascii/qf-full-msg.test.d.ts +1 -0
- package/dist/test/ascii/qf-full-msg.test.js +81 -0
- package/dist/test/ascii/qf-full-msg.test.js.map +1 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.d.ts +1 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.js +87 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.js.map +1 -0
- package/dist/test/ascii/session-state.test.d.ts +1 -0
- package/dist/test/ascii/session-state.test.js +73 -0
- package/dist/test/ascii/session-state.test.js.map +1 -0
- package/dist/test/ascii/session.test.d.ts +1 -0
- package/dist/test/ascii/session.test.js +280 -0
- package/dist/test/ascii/session.test.js.map +1 -0
- package/dist/test/ascii/time-formatter.test.d.ts +1 -0
- package/dist/test/ascii/time-formatter.test.js +80 -0
- package/dist/test/ascii/time-formatter.test.js.map +1 -0
- package/dist/test/ascii/view-decode.test.d.ts +1 -0
- package/dist/test/ascii/view-decode.test.js +183 -0
- package/dist/test/ascii/view-decode.test.js.map +1 -0
- package/dist/test/ascii-encoder.test.d.ts +1 -1
- package/dist/test/ascii-encoder.test.js +51 -48
- package/dist/test/ascii-encoder.test.js.map +1 -1
- package/dist/test/ascii-parser.test.d.ts +1 -1
- package/dist/test/ascii-parser.test.js +31 -48
- package/dist/test/ascii-parser.test.js.map +1 -1
- package/dist/test/ascii-segment.test.d.ts +1 -1
- package/dist/test/ascii-segment.test.js +19 -39
- package/dist/test/ascii-segment.test.js.map +1 -1
- package/dist/test/ascii-store-replay.test.d.ts +1 -1
- package/dist/test/ascii-store-replay.test.js +12 -41
- package/dist/test/ascii-store-replay.test.js.map +1 -1
- package/dist/test/ascii-tag-pos.test.d.ts +1 -1
- package/dist/test/ascii-tag-pos.test.js +8 -8
- package/dist/test/ascii-tag-pos.test.js.map +1 -1
- package/dist/test/elastic-buffer.test.d.ts +1 -1
- package/dist/test/elastic-buffer.test.js +3 -1
- package/dist/test/elastic-buffer.test.js.map +1 -1
- package/dist/test/encode-proxy.test.d.ts +1 -1
- package/dist/test/encode-proxy.test.js +9 -9
- package/dist/test/encode-proxy.test.js.map +1 -1
- package/dist/test/env/experiment.d.ts +23 -0
- package/dist/test/env/experiment.js +33 -0
- package/dist/test/env/experiment.js.map +1 -0
- package/dist/test/env/parsing-result.d.ts +10 -0
- package/dist/test/env/parsing-result.js +14 -0
- package/dist/test/env/parsing-result.js.map +1 -0
- package/dist/test/env/setup.d.ts +39 -0
- package/dist/test/env/setup.js +98 -0
- package/dist/test/env/setup.js.map +1 -0
- package/dist/test/env/skeleton-runner.d.ts +15 -0
- package/dist/test/env/skeleton-runner.js +108 -0
- package/dist/test/env/skeleton-runner.js.map +1 -0
- package/dist/test/env/test-recovery.d.ts +13 -0
- package/dist/test/env/test-recovery.js +41 -0
- package/dist/test/env/test-recovery.js.map +1 -0
- package/dist/test/env/to-views.d.ts +11 -0
- package/dist/test/env/to-views.js +56 -0
- package/dist/test/env/to-views.js.map +1 -0
- package/dist/test/execution-report.test.d.ts +1 -1
- package/dist/test/execution-report.test.js +53 -49
- package/dist/test/execution-report.test.js.map +1 -1
- package/dist/test/experiment.d.ts +23 -0
- package/dist/test/experiment.js +33 -0
- package/dist/test/experiment.js.map +1 -0
- package/dist/test/expieriment.d.ts +23 -0
- package/dist/test/expieriment.js +33 -0
- package/dist/test/expieriment.js.map +1 -0
- package/dist/test/fix-log-replay.test.d.ts +1 -1
- package/dist/test/fix-log-replay.test.js +7 -5
- package/dist/test/fix-log-replay.test.js.map +1 -1
- package/dist/test/fix-repo-dict.test.d.ts +1 -1
- package/dist/test/fix-repo-dict.test.js +6 -5
- package/dist/test/fix-repo-dict.test.js.map +1 -1
- package/dist/test/fixml/fixml-alloc-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-alloc-parse.test.js +161 -0
- package/dist/test/fixml/fixml-alloc-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js +61 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js +34 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js +97 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js.map +1 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.d.ts +1 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.js +143 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -0
- package/dist/test/fixml-alloc-parse.test.d.ts +1 -1
- package/dist/test/fixml-alloc-parse.test.js +2 -1
- package/dist/test/fixml-alloc-parse.test.js.map +1 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.d.ts +1 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.js +2 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.js.map +1 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.d.ts +1 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.js +2 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.js.map +1 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.d.ts +1 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.js +2 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.js.map +1 -1
- package/dist/test/includes.test.d.ts +1 -1
- package/dist/test/includes.test.js +1 -0
- package/dist/test/includes.test.js.map +1 -1
- package/dist/test/logon.test.d.ts +1 -1
- package/dist/test/logon.test.js +11 -11
- package/dist/test/logon.test.js.map +1 -1
- package/dist/test/memory-store.test.d.ts +1 -1
- package/dist/test/memory-store.test.js +11 -8
- package/dist/test/memory-store.test.js.map +1 -1
- package/dist/test/qf-full-msg.test.d.ts +1 -1
- package/dist/test/qf-full-msg.test.js +25 -20
- package/dist/test/qf-full-msg.test.js.map +1 -1
- package/dist/test/repo-full-ascii-msg.test.d.ts +1 -1
- package/dist/test/repo-full-ascii-msg.test.js +22 -17
- package/dist/test/repo-full-ascii-msg.test.js.map +1 -1
- package/dist/test/repo-full-fixml-msg.test.d.ts +1 -1
- package/dist/test/repo-full-fixml-msg.test.js +21 -18
- package/dist/test/repo-full-fixml-msg.test.js.map +1 -1
- package/dist/test/session-state.test.d.ts +1 -1
- package/dist/test/session-state.test.js +1 -0
- package/dist/test/session-state.test.js.map +1 -1
- package/dist/test/session.test.d.ts +1 -1
- package/dist/test/session.test.js +152 -164
- package/dist/test/session.test.js.map +1 -1
- package/dist/test/setup.d.ts +45 -0
- package/dist/test/setup.js +102 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/test/skeleton-runner.d.ts +15 -0
- package/dist/test/skeleton-runner.js +108 -0
- package/dist/test/skeleton-runner.js.map +1 -0
- package/dist/test/time-formatter.test.d.ts +1 -1
- package/dist/test/time-formatter.test.js +3 -1
- package/dist/test/time-formatter.test.js.map +1 -1
- package/dist/test/to-views.d.ts +1 -1
- package/dist/test/to-views.js +5 -4
- package/dist/test/to-views.js.map +1 -1
- package/dist/test/view-decode.test.d.ts +1 -1
- package/dist/test/view-decode.test.js +9 -34
- package/dist/test/view-decode.test.js.map +1 -1
- package/dist/time-formatter.test.d.ts +0 -0
- package/dist/time-formatter.test.js +1 -0
- package/dist/time-formatter.test.js.map +1 -0
- package/dist/to-views.d.ts +0 -0
- package/dist/to-views.js +1 -0
- package/dist/to-views.js.map +1 -0
- package/dist/token.txt +248 -0
- package/dist/transport/FixEntity.d.ts +8 -0
- package/dist/transport/FixEntity.js +12 -0
- package/dist/transport/FixEntity.js.map +1 -0
- package/dist/transport/a-session-msg-factory.d.ts +2 -2
- package/dist/transport/a-session-msg-factory.js.map +1 -1
- package/dist/transport/ascii/ascii-msg-transmitter.js +31 -9
- package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.d.ts +2 -2
- package/dist/transport/ascii/ascii-session-msg-factory.js +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.js.map +1 -1
- package/dist/transport/ascii/ascii-session.d.ts +9 -1
- package/dist/transport/ascii/ascii-session.js +86 -35
- package/dist/transport/ascii/ascii-session.js.map +1 -1
- package/dist/transport/ascii/index.d.ts +0 -1
- package/dist/transport/ascii/index.js +0 -1
- package/dist/transport/ascii/index.js.map +1 -1
- package/dist/transport/duplex/http-duplex.d.ts +1 -1
- package/dist/transport/duplex/http-duplex.js +2 -2
- package/dist/transport/duplex/http-duplex.js.map +1 -1
- package/dist/transport/duplex/tcp-duplex.js +22 -2
- package/dist/transport/duplex/tcp-duplex.js.map +1 -1
- package/dist/transport/factory/index.d.ts +1 -0
- package/dist/transport/factory/index.js +14 -0
- package/dist/transport/factory/index.js.map +1 -0
- package/dist/transport/{msg-transport.d.ts → factory/msg-transport.d.ts} +4 -4
- package/dist/transport/factory/msg-transport.js +61 -0
- package/dist/transport/factory/msg-transport.js.map +1 -0
- package/dist/transport/fix-acceptor.d.ts +2 -2
- package/dist/transport/fix-acceptor.js.map +1 -1
- package/dist/transport/fix-entity.d.ts +8 -0
- package/dist/transport/fix-entity.js +12 -0
- package/dist/transport/fix-entity.js.map +1 -0
- package/dist/transport/fix-initiator.d.ts +2 -2
- package/dist/transport/fix-initiator.js.map +1 -1
- package/dist/transport/fix-msg-factory.d.ts +1 -1
- package/dist/transport/fix-msg-factory.js.map +1 -1
- package/dist/transport/fix-session-state-args.d.ts +8 -0
- package/dist/transport/fix-session-state-args.js +3 -0
- package/dist/transport/fix-session-state-args.js.map +1 -0
- package/dist/transport/fix-session-state.d.ts +3 -41
- package/dist/transport/fix-session-state.js +21 -51
- package/dist/transport/fix-session-state.js.map +1 -1
- package/dist/transport/fix-session.d.ts +9 -2
- package/dist/transport/fix-session.js +113 -58
- package/dist/transport/fix-session.js.map +1 -1
- package/dist/transport/fixml/fixml-msg-transmitter.js +23 -5
- package/dist/transport/fixml/fixml-msg-transmitter.js.map +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.d.ts +2 -2
- package/dist/transport/fixml/fixml-session-msg-factory.js +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.js.map +1 -1
- package/dist/transport/fixml/fixml-session.d.ts +1 -1
- package/dist/transport/fixml/fixml-session.js +3 -3
- package/dist/transport/fixml/fixml-session.js.map +1 -1
- package/dist/transport/fixml/index.d.ts +0 -2
- package/dist/transport/fixml/index.js +0 -2
- package/dist/transport/fixml/index.js.map +1 -1
- package/dist/transport/http/html-options.d.ts +8 -0
- package/dist/transport/http/html-options.js +3 -0
- package/dist/transport/http/html-options.js.map +1 -0
- package/dist/transport/http/html-route.d.ts +5 -0
- package/dist/transport/http/html-route.js +3 -0
- package/dist/transport/http/html-route.js.map +1 -0
- package/dist/transport/http/http-acceptor-listener.d.ts +7 -0
- package/dist/transport/http/http-acceptor-listener.js +68 -0
- package/dist/transport/http/http-acceptor-listener.js.map +1 -0
- package/dist/transport/http/http-acceptor.js +31 -11
- package/dist/transport/http/http-acceptor.js.map +1 -1
- package/dist/transport/http/http-adapter.d.ts +7 -0
- package/dist/transport/http/http-adapter.js +3 -0
- package/dist/transport/http/http-adapter.js.map +1 -0
- package/dist/transport/http/http-initiator.d.ts +9 -3
- package/dist/transport/http/http-initiator.js +57 -26
- package/dist/transport/http/http-initiator.js.map +1 -1
- package/dist/transport/http/http-json-sample-adapter.d.ts +2 -1
- package/dist/transport/http/http-json-sample-adapter.js +21 -2
- package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
- package/dist/transport/http/http-transaction.d.ts +1 -1
- package/dist/transport/http/http-transaction.js.map +1 -1
- package/dist/transport/http/http-transport-description.d.ts +8 -0
- package/dist/transport/http/http-transport-description.js +3 -0
- package/dist/transport/http/http-transport-description.js.map +1 -0
- package/dist/transport/http/index.d.ts +1 -0
- package/dist/transport/http/index.js +1 -0
- package/dist/transport/http/index.js.map +1 -1
- package/dist/transport/index.d.ts +11 -10
- package/dist/transport/index.js +11 -10
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/{make-fixl-session.d.ts → make-fix-session.d.ts} +0 -0
- package/dist/transport/make-fix-session.js +3 -0
- package/dist/transport/make-fix-session.js.map +1 -0
- package/dist/transport/msg-application.d.ts +12 -0
- package/dist/transport/msg-application.js +3 -0
- package/dist/transport/msg-application.js.map +1 -0
- package/dist/transport/msg-transmitter.d.ts +5 -5
- package/dist/transport/msg-transmitter.js +2 -3
- package/dist/transport/msg-transmitter.js.map +1 -1
- package/dist/transport/session/a-session-msg-factory.d.ts +23 -0
- package/dist/transport/session/a-session-msg-factory.js +58 -0
- package/dist/transport/session/a-session-msg-factory.js.map +1 -0
- package/dist/transport/session/fix-session-state-args.d.ts +8 -0
- package/dist/transport/session/fix-session-state-args.js +3 -0
- package/dist/transport/session/fix-session-state-args.js.map +1 -0
- package/dist/transport/session/fix-session-state.d.ts +32 -0
- package/dist/transport/session/fix-session-state.js +133 -0
- package/dist/transport/session/fix-session-state.js.map +1 -0
- package/dist/transport/session/fix-session.d.ts +50 -0
- package/dist/transport/session/fix-session.js +291 -0
- package/dist/transport/session/fix-session.js.map +1 -0
- package/dist/transport/session/make-fix-session.d.ts +5 -0
- package/dist/transport/session/make-fix-session.js +3 -0
- package/dist/transport/session/make-fix-session.js.map +1 -0
- package/dist/transport/session/session-description.d.ts +17 -0
- package/dist/transport/session/session-description.js +3 -0
- package/dist/transport/session/session-description.js.map +1 -0
- package/dist/transport/session/session-msg-factory.d.ts +15 -0
- package/dist/transport/session/session-msg-factory.js +3 -0
- package/dist/transport/session/session-msg-factory.js.map +1 -0
- package/dist/transport/session/session-state.d.ts +25 -0
- package/dist/transport/session/session-state.js +30 -0
- package/dist/transport/session/session-state.js.map +1 -0
- package/dist/transport/session-description.d.ts +1 -48
- package/dist/transport/session-description.js.map +1 -1
- package/dist/transport/session-msg-factory.d.ts +14 -5
- package/dist/transport/session-msg-factory.js +0 -10
- package/dist/transport/session-msg-factory.js.map +1 -1
- package/dist/transport/session-state.d.ts +25 -0
- package/dist/transport/session-state.js +30 -0
- package/dist/transport/session-state.js.map +1 -0
- package/dist/transport/tcp/index.d.ts +3 -2
- package/dist/transport/tcp/index.js +3 -2
- package/dist/transport/tcp/index.js.map +1 -1
- package/dist/transport/tcp/recovering-tcp-initiator.d.ts +7 -9
- package/dist/transport/tcp/recovering-tcp-initiator.js +41 -16
- package/dist/transport/tcp/recovering-tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-acceptor-listener.d.ts +7 -0
- package/dist/transport/tcp/tcp-acceptor-listener.js +70 -0
- package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -0
- package/dist/transport/tcp/tcp-acceptor.d.ts +7 -0
- package/dist/transport/tcp/tcp-acceptor.js +79 -43
- package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
- package/dist/transport/tcp/tcp-initiator-connector.d.ts +10 -0
- package/dist/transport/tcp/tcp-initiator-connector.js +97 -0
- package/dist/transport/tcp/tcp-initiator-connector.js.map +1 -0
- package/dist/transport/tcp/tcp-initiator.d.ts +4 -2
- package/dist/transport/tcp/tcp-initiator.js +82 -36
- package/dist/transport/tcp/tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-transport-description.d.ts +6 -0
- package/dist/transport/tcp/tcp-transport-description.js +3 -0
- package/dist/transport/tcp/tcp-transport-description.js.map +1 -0
- package/dist/transport/tcp/tls-options-factory.d.ts +9 -0
- package/dist/transport/tcp/tls-options-factory.js +53 -0
- package/dist/transport/tcp/tls-options-factory.js.map +1 -0
- package/dist/transport/tcp/tls-options.d.ts +10 -5
- package/dist/transport/tcp/tls-options.js +0 -49
- package/dist/transport/tcp/tls-options.js.map +1 -1
- package/dist/transport/tick-action.d.ts +8 -0
- package/dist/transport/tick-action.js +13 -0
- package/dist/transport/tick-action.js.map +1 -0
- package/dist/util/definition-factory.d.ts +10 -0
- package/dist/util/definition-factory.js +56 -0
- package/dist/util/definition-factory.js.map +1 -0
- package/dist/util/dictionary-path.d.ts +4 -0
- package/dist/util/dictionary-path.js +3 -0
- package/dist/util/dictionary-path.js.map +1 -0
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/json-helper.d.ts +3 -1
- package/dist/util/json-helper.js +13 -12
- package/dist/util/json-helper.js.map +1 -1
- package/dist/util/message-generator.d.ts +1 -1
- package/dist/util/message-generator.js +16 -15
- package/dist/util/message-generator.js.map +1 -1
- package/dist/util/replay.d.ts +6 -3
- package/dist/util/replay.js +24 -26
- package/dist/util/replay.js.map +1 -1
- package/package.json +23 -17
- package/script/build.cmd +1 -0
- package/script/build.sh +1 -0
- package/script/genkey.ps1 +179 -179
- package/script/test.cmd +3 -0
- package/src/buffer/{ascii-chars.ts → ascii/ascii-chars.ts} +0 -0
- package/src/buffer/ascii/ascii-encoder.ts +78 -37
- package/src/buffer/ascii/ascii-parser-state.ts +7 -12
- package/src/buffer/ascii/ascii-parser.ts +23 -16
- package/src/buffer/ascii/ascii-segment-parser.ts +14 -8
- package/src/buffer/ascii/ascii-view.ts +4 -9
- package/src/buffer/ascii/index.ts +1 -0
- package/src/buffer/ascii/parse-state.ts +8 -0
- package/src/buffer/ascii/time-formatter.ts +3 -3
- package/src/buffer/elastic-buffer.ts +7 -2
- package/src/buffer/encode-proxy.ts +10 -5
- package/src/buffer/fixml/fixml-encoder.ts +15 -11
- package/src/buffer/fixml/fixml-parser.ts +16 -6
- package/src/buffer/fixml/fixml-view.ts +4 -4
- package/src/buffer/fixml/populated-attributes.ts +6 -0
- package/src/buffer/index.ts +4 -8
- package/src/buffer/msg-encoder.ts +2 -1
- package/src/buffer/msg-view.ts +13 -6
- package/src/buffer/{segment-description.ts → segment/segment-description.ts} +4 -11
- package/src/buffer/{segment-summary.ts → segment/segment-summary.ts} +0 -0
- package/src/buffer/segment/segment-type.ts +8 -0
- package/src/buffer/structure.ts +3 -3
- package/src/buffer/{tag-pos.ts → tag/tag-pos.ts} +0 -0
- package/src/buffer/tag/tag-type.ts +13 -0
- package/src/buffer/{tags.ts → tag/tags.ts} +4 -16
- package/src/config/get-js-fx-logger.ts +4 -0
- package/src/config/index.ts +1 -0
- package/src/config/js-fix-config.ts +5 -2
- package/src/config/js-fix-logger.ts +0 -3
- package/src/dictionary/compiler/compiler-type.ts +3 -3
- package/src/dictionary/compiler/enum-compiler.ts +12 -1
- package/src/dictionary/compiler/msg-compiler.ts +8 -7
- package/src/dictionary/contained/contained-component-field.ts +2 -1
- package/src/dictionary/contained/contained-field-dispatch.ts +3 -7
- package/src/dictionary/contained/contained-field-dispatcher.ts +9 -0
- package/src/dictionary/contained/contained-field-set.ts +5 -3
- package/src/dictionary/contained/contained-field-type.ts +5 -0
- package/src/dictionary/contained/contained-field.ts +1 -6
- package/src/dictionary/contained/contained-group-field.ts +2 -1
- package/src/dictionary/contained/contained-simple-field.ts +2 -1
- package/src/dictionary/contained/field-dispatcher.ts +9 -0
- package/src/dictionary/contained/fields-dispatch.ts +46 -0
- package/src/dictionary/contained/index.ts +2 -0
- package/src/dictionary/contained-set-type.ts +5 -0
- package/src/dictionary/definition/component-field-definition.ts +1 -1
- package/src/dictionary/definition/fix-definitions.ts +2 -1
- package/src/dictionary/definition/group-field-definition.ts +1 -1
- package/src/dictionary/definition/index.ts +0 -1
- package/src/dictionary/definition/message-definition.ts +1 -1
- package/src/dictionary/definition/simple-field-definition.ts +3 -1
- package/src/dictionary/dict-primitive.ts +0 -13
- package/src/dictionary/fix-definition-source.ts +6 -0
- package/src/dictionary/fix-versions.ts +0 -32
- package/src/dictionary/index.ts +1 -5
- package/src/dictionary/parser/fix-repository/abbreviations-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/base-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/components-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/data-types-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/enums-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/fields-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/messages-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/msg-contents-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/repository-abbreviation.ts +6 -0
- package/src/dictionary/parser/fix-repository/repository-component.ts +11 -0
- package/src/dictionary/parser/fix-repository/repository-data-type.ts +7 -0
- package/src/dictionary/parser/fix-repository/repository-enum.ts +8 -0
- package/src/dictionary/parser/fix-repository/repository-field.ts +12 -0
- package/src/dictionary/parser/fix-repository/repository-message.ts +12 -0
- package/src/dictionary/parser/fix-repository/repository-msg-content.ts +10 -0
- package/src/dictionary/parser/fix-repository/repository-type.ts +0 -59
- package/src/dictionary/parser/fix-repository/repository-xml-parser.ts +10 -9
- package/src/dictionary/parser/fix-repository/repository.ts +69 -38
- package/src/dictionary/parser/fixml/components-parser.ts +6 -3
- package/src/dictionary/parser/fixml/fields-parser.ts +1 -1
- package/src/dictionary/parser/fixml/fix-xsd-parser.ts +2 -1
- package/src/dictionary/parser/fixml/include-graph.ts +2 -1
- package/src/dictionary/parser/fixml/xsd-parser.ts +2 -1
- package/src/dictionary/parser/quickfix/field-definition-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/field-set-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/message-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/node-parser.ts +3 -6
- package/src/dictionary/parser/quickfix/parse-state.ts +8 -0
- package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +9 -15
- package/src/dictionary/sax-node.ts +7 -0
- package/src/dictionary/set-reduce.ts +30 -31
- package/src/dictionary/type-dispatcher.ts +7 -0
- package/src/dictionary/version-util.ts +25 -0
- package/src/index.ts +1 -0
- package/src/jsfix-cmd.ts +31 -16
- package/src/runtime/di-tokens.ts +48 -0
- package/src/runtime/engine-factory.ts +5 -0
- package/src/runtime/index.ts +5 -0
- package/src/runtime/make-config.ts +35 -0
- package/src/runtime/session-container.ts +180 -0
- package/src/runtime/session-launcher.ts +127 -0
- package/src/sample/http/oms/app.ts +20 -14
- package/src/sample/http/oms/http-client.ts +5 -2
- package/src/sample/http/oms/http-server.ts +5 -1
- package/src/sample/tcp/qf-md/app.ts +12 -12
- package/src/sample/tcp/qf-md/md-client.ts +4 -1
- package/src/sample/tcp/qf-md/md-server.ts +3 -1
- package/src/sample/tcp/recovering-skeleton/app.ts +37 -15
- package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +16 -9
- package/src/sample/tcp/recovering-skeleton/skeleton-client.ts +4 -2
- package/src/sample/tcp/recovering-skeleton/skeleton-server.ts +4 -2
- package/src/sample/tcp/skeleton/app.ts +10 -15
- package/src/sample/tcp/skeleton/skeleton-session.ts +29 -3
- package/src/sample/tcp/tls-trade-capture/app.ts +8 -31
- package/src/sample/tcp/trade-capture/app-launcher.ts +22 -0
- package/src/sample/tcp/trade-capture/app.ts +3 -26
- package/src/sample/tcp/trade-capture/trade-capture-client.ts +10 -4
- package/src/sample/tcp/trade-capture/trade-capture-server.ts +2 -1
- package/src/sample/tcp/trade-capture/trade-factory.ts +7 -1
- package/src/store/fix-msg-ascii-store-resend.ts +6 -4
- package/src/store/fix-msg-memory-store.ts +1 -1
- package/src/store/fix-msg-store-record.ts +7 -0
- package/src/store/fix-msg-store-state.ts +6 -0
- package/src/store/fix-msg-store.ts +1 -7
- package/src/transport/ascii/ascii-msg-transmitter.ts +15 -8
- package/src/transport/ascii/ascii-session-msg-factory.ts +2 -2
- package/src/transport/ascii/ascii-session.ts +84 -25
- package/src/transport/ascii/index.ts +0 -1
- package/src/transport/duplex/http-duplex.ts +3 -3
- package/src/transport/duplex/tcp-duplex.ts +4 -1
- package/src/transport/factory/index.ts +1 -0
- package/src/transport/factory/msg-transport.ts +55 -0
- package/src/transport/fix-acceptor.ts +2 -2
- package/src/transport/fix-entity.ts +9 -0
- package/src/transport/fix-initiator.ts +2 -2
- package/src/transport/fixml/fixml-msg-transmitter.ts +8 -4
- package/src/transport/fixml/fixml-session-msg-factory.ts +2 -2
- package/src/transport/fixml/fixml-session.ts +2 -2
- package/src/transport/fixml/index.ts +0 -2
- package/src/transport/http/html-options.ts +8 -0
- package/src/transport/http/html-route.ts +6 -0
- package/src/transport/http/http-acceptor-listener.ts +42 -0
- package/src/transport/http/http-acceptor.ts +12 -8
- package/src/transport/http/http-adapter.ts +7 -0
- package/src/transport/http/http-initiator.ts +40 -25
- package/src/transport/http/http-json-sample-adapter.ts +7 -2
- package/src/transport/http/http-transaction.ts +1 -1
- package/src/transport/http/http-transport-description.ts +9 -0
- package/src/transport/http/index.ts +1 -0
- package/src/transport/index.ts +11 -10
- package/src/transport/msg-application.ts +13 -0
- package/src/transport/msg-transmitter.ts +5 -5
- package/src/transport/{a-session-msg-factory.ts → session/a-session-msg-factory.ts} +4 -4
- package/src/transport/session/fix-session-state-args.ts +9 -0
- package/src/transport/{fix-session-state.ts → session/fix-session-state.ts} +8 -45
- package/src/transport/{fix-session.ts → session/fix-session.ts} +108 -44
- package/src/transport/{make-fixl-session.ts → session/make-fix-session.ts} +1 -1
- package/src/transport/session/session-description.ts +18 -0
- package/src/transport/{fix-msg-factory.ts → session/session-msg-factory.ts} +2 -2
- package/src/transport/session/session-state.ts +25 -0
- package/src/transport/tcp/index.ts +3 -2
- package/src/transport/tcp/recovering-tcp-initiator.ts +24 -13
- package/src/transport/tcp/tcp-acceptor-listener.ts +45 -0
- package/src/transport/tcp/tcp-acceptor.ts +65 -40
- package/src/transport/tcp/tcp-initiator-connector.ts +71 -0
- package/src/transport/tcp/tcp-initiator.ts +71 -42
- package/src/transport/tcp/tcp-transport-description.ts +7 -0
- package/src/transport/tcp/tls-options-factory.ts +55 -0
- package/src/transport/tcp/tls-options.ts +9 -51
- package/src/transport/tick-action.ts +8 -0
- package/src/util/definition-factory.ts +47 -0
- package/src/util/dictionary-path.ts +4 -0
- package/src/util/index.ts +1 -1
- package/src/util/json-helper.ts +14 -4
- package/src/util/message-generator.ts +6 -3
- package/src/util/replay.ts +26 -21
- package/tsconfig.json +2 -0
- package/dist/buffer/ascii-chars.js.map +0 -1
- package/dist/dictionary/fields-dispatch.js +0 -40
- package/dist/dictionary/fields-dispatch.js.map +0 -1
- package/dist/transport/ascii-session-msg-factory.d.ts +0 -16
- package/dist/transport/ascii-session-msg-factory.js +0 -47
- package/dist/transport/ascii-session-msg-factory.js.map +0 -1
- package/dist/transport/fixml/acceptor.d.ts +0 -3
- package/dist/transport/fixml/acceptor.js +0 -38
- package/dist/transport/fixml/acceptor.js.map +0 -1
- package/dist/transport/fixml-session-msg-factory.d.ts +0 -13
- package/dist/transport/fixml-session-msg-factory.js +0 -68
- package/dist/transport/fixml-session-msg-factory.js.map +0 -1
- package/dist/transport/make-config.d.ts +0 -4
- package/dist/transport/make-config.js +0 -31
- package/dist/transport/make-config.js.map +0 -1
- package/dist/transport/make-fixl-session.js.map +0 -1
- package/dist/transport/msg-transport.js +0 -57
- package/dist/transport/msg-transport.js.map +0 -1
- package/dist/transport/tcp/acceptor.d.ts +0 -3
- package/dist/transport/tcp/acceptor.js +0 -40
- package/dist/transport/tcp/acceptor.js.map +0 -1
- package/dist/transport/tcp/initiator.d.ts +0 -3
- package/dist/transport/tcp/initiator.js +0 -67
- package/dist/transport/tcp/initiator.js.map +0 -1
- package/dist/util/dictionary-definitions.d.ts +0 -8
- package/dist/util/dictionary-definitions.js +0 -51
- package/dist/util/dictionary-definitions.js.map +0 -1
- package/src/dictionary/fields-dispatch.ts +0 -45
- package/src/sample/launcher.ts +0 -56
- package/src/transport/fixml/acceptor.ts +0 -29
- package/src/transport/make-config.ts +0 -19
- package/src/transport/msg-transport.ts +0 -67
- package/src/transport/session-description.ts +0 -70
- package/src/transport/tcp/acceptor.ts +0 -31
- package/src/transport/tcp/initiator.ts +0 -59
- package/src/util/dictionary-definitions.ts +0 -41
package/src/transport/index.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export * from './tcp'
|
|
2
|
-
export * from './http'
|
|
3
|
-
export * from './ascii'
|
|
4
1
|
export * from './duplex'
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
2
|
+
export * from './fix-entity'
|
|
3
|
+
export * from './session/a-session-msg-factory'
|
|
7
4
|
export * from './fix-acceptor'
|
|
8
5
|
export * from './fix-initiator'
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './fix-session'
|
|
11
|
-
export * from './
|
|
6
|
+
export * from './session/session-msg-factory'
|
|
7
|
+
export * from './session/fix-session'
|
|
8
|
+
export * from './session/session-state'
|
|
9
|
+
export * from './session/fix-session-state'
|
|
12
10
|
export * from './msg-transmitter'
|
|
13
|
-
export * from './msg-transport'
|
|
14
11
|
export * from './msg-payload'
|
|
15
|
-
export * from './session-description'
|
|
12
|
+
export * from './session/session-description'
|
|
13
|
+
export * from './tick-action'
|
|
14
|
+
export * from './session/make-fix-session'
|
|
15
|
+
export * from './msg-application'
|
|
16
|
+
export * from './ascii/ascii-session'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ITcpTransportDescription } from './tcp/tcp-transport-description'
|
|
2
|
+
import { IHttpTransportDescription } from './http/http-transport-description'
|
|
3
|
+
|
|
4
|
+
export interface IMsgApplication {
|
|
5
|
+
readonly name: string
|
|
6
|
+
readonly type: string,
|
|
7
|
+
readonly resilient: boolean
|
|
8
|
+
readonly reconnectSeconds: number
|
|
9
|
+
readonly tcp?: ITcpTransportDescription,
|
|
10
|
+
readonly http?: IHttpTransportDescription,
|
|
11
|
+
readonly protocol: string,
|
|
12
|
+
readonly dictionary: string
|
|
13
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MsgEncoder, ElasticBuffer } from '../buffer'
|
|
2
|
-
import { FixDefinitions } from '../dictionary'
|
|
2
|
+
import { FixDefinitions } from '../dictionary/definition'
|
|
3
3
|
import { Transform } from 'stream'
|
|
4
4
|
import { MsgPayload } from './msg-payload'
|
|
5
5
|
import { ILooseObject } from '../collections/collection'
|
|
6
|
-
import { ISessionDescription } from './session-description'
|
|
6
|
+
import { ISessionDescription } from './session/session-description'
|
|
7
7
|
import * as events from 'events'
|
|
8
8
|
|
|
9
9
|
export abstract class MsgTransmitter extends events.EventEmitter {
|
|
10
10
|
public readonly encodeStream: Transform
|
|
11
|
-
public
|
|
12
|
-
protected encoder: MsgEncoder
|
|
11
|
+
public encoder: MsgEncoder
|
|
13
12
|
|
|
14
|
-
protected constructor (public readonly
|
|
13
|
+
protected constructor (public readonly buffer: ElasticBuffer,
|
|
14
|
+
public readonly definitions: FixDefinitions,
|
|
15
15
|
public readonly session: ISessionDescription) {
|
|
16
16
|
super()
|
|
17
17
|
this.encodeStream = this.encoderStream()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ISessionMsgFactory } from './
|
|
1
|
+
import { ISessionMsgFactory } from './session-msg-factory'
|
|
2
2
|
import { ISessionDescription } from './session-description'
|
|
3
|
-
import { ILooseObject } from '
|
|
4
|
-
import { MsgType } from '
|
|
3
|
+
import { ILooseObject } from '../../collections/collection'
|
|
4
|
+
import { MsgType } from '../../types'
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
IHeartbeat,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
IStandardHeader,
|
|
12
12
|
IStandardTrailer,
|
|
13
13
|
ITestRequest
|
|
14
|
-
} from '
|
|
14
|
+
} from '../../types/FIX4.4/repo'
|
|
15
15
|
|
|
16
16
|
export interface ObjectMutator { (description: ISessionDescription, type: string, o: ILooseObject): ILooseObject
|
|
17
17
|
}
|
|
@@ -1,48 +1,8 @@
|
|
|
1
|
-
import { ElasticBuffer } from '
|
|
1
|
+
import { ElasticBuffer } from '../../buffer'
|
|
2
2
|
import moment = require('moment')
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
DisconnectedConnectionToday = 2,
|
|
7
|
-
DetectBrokenNetworkConnection = 3,
|
|
8
|
-
AwaitingConnection = 4,
|
|
9
|
-
InitiateConnection = 5,
|
|
10
|
-
NetworkConnectionEstablished = 6,
|
|
11
|
-
InitiationLogonSent = 7,
|
|
12
|
-
InitiationLogonReceived = 8,
|
|
13
|
-
InitiationLogonResponse = 9,
|
|
14
|
-
HandleResendRequest = 10,
|
|
15
|
-
ReceiveMsgSeqNumTooHigh = 11,
|
|
16
|
-
AwaitingProcessingResponseToResendRequest = 12,
|
|
17
|
-
NoMessagesReceivedInInterval = 13,
|
|
18
|
-
AwaitingProcessingResponseToTestRequest = 14,
|
|
19
|
-
ReceiveLogout = 15,
|
|
20
|
-
InitiateLogout = 16,
|
|
21
|
-
ActiveNormalSession = 17,
|
|
22
|
-
WaitingForALogon = 18,
|
|
23
|
-
PeerLogonRejected = 20,
|
|
24
|
-
WaitingLogoutConfirm = 21,
|
|
25
|
-
ConfirmingLogout = 22,
|
|
26
|
-
Stopped = 23,
|
|
27
|
-
Idle = 24
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export enum TickAction {
|
|
31
|
-
Nothing = 1,
|
|
32
|
-
Heartbeat = 2,
|
|
33
|
-
TestRequest = 3,
|
|
34
|
-
TerminateOnError = 4,
|
|
35
|
-
WaitLogoutConfirmExpired = 5,
|
|
36
|
-
Stop = 6
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface IFixSessionStateArgs {
|
|
40
|
-
heartBeat: number
|
|
41
|
-
state?: SessionState
|
|
42
|
-
waitLogoutConfirmSeconds?: number
|
|
43
|
-
stopSeconds?: number
|
|
44
|
-
lastPeerMsgSeqNum?: number
|
|
45
|
-
}
|
|
3
|
+
import { TickAction } from '../tick-action'
|
|
4
|
+
import { IFixSessionStateArgs } from './fix-session-state-args'
|
|
5
|
+
import { SessionState } from './session-state'
|
|
46
6
|
|
|
47
7
|
export class FixSessionState {
|
|
48
8
|
public nextTickAction: TickAction = TickAction.Nothing
|
|
@@ -74,6 +34,7 @@ export class FixSessionState {
|
|
|
74
34
|
this.secondsSinceReceive = -1
|
|
75
35
|
this.peerHeartBeatSecs = 0
|
|
76
36
|
this.logoutSentAt = null
|
|
37
|
+
this.nextTickAction = TickAction.Nothing
|
|
77
38
|
if (resetSeqNo) {
|
|
78
39
|
this.lastPeerMsgSeqNum = 0
|
|
79
40
|
}
|
|
@@ -105,7 +66,7 @@ export class FixSessionState {
|
|
|
105
66
|
buffer.writeString(`compId = ${this.compId}, `)
|
|
106
67
|
buffer.writeString(`heartBeat = ${this.heartBeat}, `)
|
|
107
68
|
buffer.writeString(`state = ${SessionState[this.state]} (${this.state}), `)
|
|
108
|
-
buffer.writeString(`nextTickAction = ${this.nextTickAction}, `)
|
|
69
|
+
buffer.writeString(`nextTickAction = ${TickAction[this.nextTickAction]} (${this.nextTickAction}), `)
|
|
109
70
|
buffer.writeString(`now = ${FixSessionState.dateAsString(this.now)}, `)
|
|
110
71
|
buffer.writeString(`timeToDie = ${this.timeToDie()}, `)
|
|
111
72
|
buffer.writeString(`timeToHeartbeat = ${this.timeToHeartbeat()}, `)
|
|
@@ -146,6 +107,8 @@ export class FixSessionState {
|
|
|
146
107
|
break
|
|
147
108
|
}
|
|
148
109
|
|
|
110
|
+
case SessionState.ActiveNormalSession:
|
|
111
|
+
case SessionState.AwaitingProcessingResponseToTestRequest:
|
|
149
112
|
case SessionState.InitiationLogonReceived:
|
|
150
113
|
case SessionState.InitiationLogonResponse : {
|
|
151
114
|
if (this.timeToHeartbeat()) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ElasticBuffer, MsgView
|
|
2
|
-
import { IJsFixConfig, IJsFixLogger } from '
|
|
3
|
-
import { FixSessionState
|
|
4
|
-
import { MsgTransport } from '
|
|
5
|
-
import { MsgTag } from '
|
|
6
|
-
import { ILooseObject } from '
|
|
1
|
+
import { ElasticBuffer, MsgView } from '../../buffer'
|
|
2
|
+
import { IJsFixConfig, IJsFixLogger } from '../../config'
|
|
3
|
+
import { FixSessionState } from './fix-session-state'
|
|
4
|
+
import { MsgTransport } from '../factory'
|
|
5
|
+
import { MsgTag } from '../../types'
|
|
6
|
+
import { ILooseObject } from '../../collections/collection'
|
|
7
7
|
|
|
8
8
|
import * as events from 'events'
|
|
9
|
+
import { SessionState } from './session-state'
|
|
10
|
+
import { SegmentType } from '../../buffer/segment/segment-type'
|
|
9
11
|
|
|
10
12
|
export abstract class FixSession extends events.EventEmitter {
|
|
11
13
|
public logReceivedMsgs: boolean = false
|
|
@@ -40,7 +42,8 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
40
42
|
if (state === this.sessionState.state) return
|
|
41
43
|
const logger = this.sessionLogger
|
|
42
44
|
const prevState = this.sessionState.state
|
|
43
|
-
|
|
45
|
+
const msg = `current state ${SessionState[prevState]} (${prevState}) moves to ${SessionState[state]} (${state})`
|
|
46
|
+
logger.info(msg)
|
|
44
47
|
this.sessionState.state = state
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -48,21 +51,19 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
48
51
|
return this.sessionState.state
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
public
|
|
54
|
+
public sendLogon () {
|
|
55
|
+
this.send(this.requestLogonType, this.config.factory.logon())
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private waitPromise (): Promise<any> {
|
|
52
59
|
const logger = this.sessionLogger
|
|
53
|
-
if (this.transport) {
|
|
54
|
-
logger.info('reset from previous transport.')
|
|
55
|
-
this.reset()
|
|
56
|
-
}
|
|
57
|
-
this.transport = transport
|
|
58
|
-
this.subscribe()
|
|
59
60
|
return new Promise<any>((accept, reject) => {
|
|
60
61
|
if (this.initiator) {
|
|
61
|
-
logger.debug(
|
|
62
|
-
this.
|
|
62
|
+
logger.debug(`initiator sending logon state = ${this.stateString()}`)
|
|
63
|
+
this.sendLogon()
|
|
63
64
|
this.setState(SessionState.InitiationLogonSent)
|
|
64
65
|
} else {
|
|
65
|
-
logger.debug(
|
|
66
|
+
logger.debug(`acceptor waits for logon state = ${this.stateString()}`)
|
|
66
67
|
this.setState(SessionState.WaitingForALogon)
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -70,12 +71,40 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
70
71
|
logger.error(e)
|
|
71
72
|
reject(e)
|
|
72
73
|
})
|
|
74
|
+
|
|
73
75
|
this.on('done', () => {
|
|
74
76
|
accept(this.transport.id)
|
|
75
77
|
})
|
|
76
78
|
})
|
|
77
79
|
}
|
|
78
80
|
|
|
81
|
+
public run (transport: MsgTransport): Promise<number> {
|
|
82
|
+
const logger = this.sessionLogger
|
|
83
|
+
if (this.transport) {
|
|
84
|
+
logger.info(`reset from previous transport. state ${this.stateString()}`)
|
|
85
|
+
this.reset()
|
|
86
|
+
}
|
|
87
|
+
this.transport = transport
|
|
88
|
+
this.subscribe()
|
|
89
|
+
return this.waitPromise()
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
protected expectedState (): boolean {
|
|
93
|
+
switch (this.sessionState.state) {
|
|
94
|
+
case SessionState.ActiveNormalSession:
|
|
95
|
+
case SessionState.ReceiveLogout:
|
|
96
|
+
case SessionState.Stopped:
|
|
97
|
+
case SessionState.ConfirmingLogout:
|
|
98
|
+
case SessionState.HandleResendRequest:
|
|
99
|
+
case SessionState.AwaitingProcessingResponseToTestRequest:
|
|
100
|
+
case SessionState.AwaitingProcessingResponseToResendRequest:
|
|
101
|
+
return true
|
|
102
|
+
|
|
103
|
+
default:
|
|
104
|
+
return false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
79
108
|
protected subscribe () {
|
|
80
109
|
|
|
81
110
|
const transport = this.transport
|
|
@@ -110,21 +139,14 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
110
139
|
|
|
111
140
|
rx.on('end', () => {
|
|
112
141
|
logger.info(`rx end received sessionState = [${this.sessionState.toString()}]`)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
default: {
|
|
123
|
-
const e = new Error(`unexpected state - transport failed? = ${SessionState[this.sessionState.state]}`)
|
|
124
|
-
logger.info(`rx error ${e.message}`)
|
|
125
|
-
this.terminate(e)
|
|
126
|
-
}
|
|
127
|
-
break
|
|
142
|
+
const expectedState = this.expectedState()
|
|
143
|
+
if (expectedState) {
|
|
144
|
+
logger.info(`rx graceful end state = ${this.stateString()}`)
|
|
145
|
+
this.done()
|
|
146
|
+
} else {
|
|
147
|
+
const e = new Error(`unexpected state - transport failed? = ${this.stateString()}`)
|
|
148
|
+
logger.info(`rx error ${e.message}`)
|
|
149
|
+
this.terminate(e)
|
|
128
150
|
}
|
|
129
151
|
})
|
|
130
152
|
|
|
@@ -144,23 +166,49 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
144
166
|
})
|
|
145
167
|
}
|
|
146
168
|
|
|
169
|
+
protected validStateApplicationMsg (): boolean {
|
|
170
|
+
switch (this.sessionState.state) {
|
|
171
|
+
case SessionState.Idle:
|
|
172
|
+
case SessionState.InitiateConnection:
|
|
173
|
+
case SessionState.InitiationLogonSent:
|
|
174
|
+
case SessionState.WaitingForALogon:
|
|
175
|
+
case SessionState.HandleResendRequest:
|
|
176
|
+
case SessionState.AwaitingProcessingResponseToTestRequest:
|
|
177
|
+
case SessionState.AwaitingProcessingResponseToResendRequest:
|
|
178
|
+
return false
|
|
179
|
+
default:
|
|
180
|
+
return true
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
protected stateString (): string {
|
|
185
|
+
return SessionState[this.sessionState.state]
|
|
186
|
+
}
|
|
187
|
+
|
|
147
188
|
protected checkForwardMsg (msgType: string, view: MsgView): void {
|
|
148
189
|
this.sessionLogger.info(`forwarding msgType = '${msgType}' to application`)
|
|
190
|
+
this.setState(SessionState.ActiveNormalSession)
|
|
149
191
|
this.onApplicationMsg(msgType, view)
|
|
150
192
|
}
|
|
151
193
|
|
|
152
194
|
protected terminate (error: Error): void {
|
|
195
|
+
if (this.sessionState.state === SessionState.Stopped) return
|
|
153
196
|
this.sessionLogger.error(error)
|
|
154
|
-
|
|
155
|
-
|
|
197
|
+
if (this.timer) {
|
|
198
|
+
clearInterval(this.timer)
|
|
199
|
+
}
|
|
200
|
+
if (this.transport) {
|
|
201
|
+
this.transport.end()
|
|
202
|
+
}
|
|
156
203
|
this.transport = null
|
|
157
|
-
this.
|
|
204
|
+
this.setState(SessionState.Stopped)
|
|
158
205
|
this.emit('error', error)
|
|
159
206
|
}
|
|
160
207
|
|
|
161
208
|
protected peerLogout (view: MsgView) {
|
|
162
209
|
const msg = view.getString(MsgTag.Text)
|
|
163
|
-
|
|
210
|
+
const state = this.sessionState.state
|
|
211
|
+
switch (state) {
|
|
164
212
|
case SessionState.WaitingLogoutConfirm: {
|
|
165
213
|
this.sessionLogger.info(`peer confirms logout Text = '${msg}'`)
|
|
166
214
|
this.stop()
|
|
@@ -168,6 +216,7 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
168
216
|
}
|
|
169
217
|
|
|
170
218
|
case SessionState.InitiationLogonResponse:
|
|
219
|
+
case SessionState.ActiveNormalSession:
|
|
171
220
|
case SessionState.InitiationLogonReceived: {
|
|
172
221
|
this.setState(SessionState.ConfirmingLogout)
|
|
173
222
|
this.sessionLogger.info(`peer initiates logout Text = '${msg}'`)
|
|
@@ -177,9 +226,10 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
177
226
|
}
|
|
178
227
|
|
|
179
228
|
protected send (msgType: string, obj: ILooseObject) {
|
|
180
|
-
|
|
229
|
+
const state = this.sessionState.state
|
|
230
|
+
switch (state) {
|
|
181
231
|
case SessionState.Stopped: {
|
|
182
|
-
this.sessionLogger.warning(`can't send in
|
|
232
|
+
this.sessionLogger.warning(`can't send in state ${this.stateString()}`)
|
|
183
233
|
break
|
|
184
234
|
}
|
|
185
235
|
|
|
@@ -191,13 +241,20 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
191
241
|
}
|
|
192
242
|
}
|
|
193
243
|
|
|
244
|
+
protected sendLogout (msg: string) {
|
|
245
|
+
const factory = this.config.factory
|
|
246
|
+
this.sessionLogger.info(`sending logout with ${msg}`)
|
|
247
|
+
this.send(this.requestLogoutType, factory.logout(this.requestLogoutType, msg))
|
|
248
|
+
}
|
|
249
|
+
|
|
194
250
|
protected sessionLogout (): void {
|
|
195
251
|
const sessionState = this.sessionState
|
|
196
252
|
if (sessionState.logoutSentAt) {
|
|
197
253
|
return
|
|
198
254
|
}
|
|
199
|
-
|
|
255
|
+
|
|
200
256
|
switch (sessionState.state) {
|
|
257
|
+
case SessionState.ActiveNormalSession:
|
|
201
258
|
case SessionState.InitiationLogonResponse:
|
|
202
259
|
case SessionState.InitiationLogonReceived: {
|
|
203
260
|
// this instance initiates logout
|
|
@@ -205,7 +262,7 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
205
262
|
sessionState.logoutSentAt = new Date()
|
|
206
263
|
const msg = `${this.me} initiate logout`
|
|
207
264
|
this.sessionLogger.info(msg)
|
|
208
|
-
this.
|
|
265
|
+
this.sendLogout(msg)
|
|
209
266
|
break
|
|
210
267
|
}
|
|
211
268
|
|
|
@@ -214,7 +271,7 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
214
271
|
sessionState.logoutSentAt = new Date()
|
|
215
272
|
const msg = `${this.me} confirming logout`
|
|
216
273
|
this.sessionLogger.info(msg)
|
|
217
|
-
this.
|
|
274
|
+
this.sendLogout(msg)
|
|
218
275
|
break
|
|
219
276
|
}
|
|
220
277
|
|
|
@@ -227,6 +284,7 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
227
284
|
public done (): void {
|
|
228
285
|
switch (this.sessionState.state) {
|
|
229
286
|
case SessionState.InitiationLogonResponse:
|
|
287
|
+
case SessionState.ActiveNormalSession:
|
|
230
288
|
case SessionState.InitiationLogonReceived: {
|
|
231
289
|
this.sessionLogout()
|
|
232
290
|
break
|
|
@@ -241,12 +299,16 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
241
299
|
break
|
|
242
300
|
}
|
|
243
301
|
}
|
|
244
|
-
this.sessionLogger.info(`done. check logout sequence`)
|
|
302
|
+
this.sessionLogger.info(`done. check logout sequence state ${this.stateString()}`)
|
|
245
303
|
}
|
|
246
304
|
|
|
247
305
|
public reset (): void {
|
|
306
|
+
if (this.timer) {
|
|
307
|
+
clearInterval(this.timer)
|
|
308
|
+
}
|
|
248
309
|
this.transport = null
|
|
249
|
-
this.
|
|
310
|
+
const resetSeqNum = this.config.description.ResetSeqNumFlag || true
|
|
311
|
+
this.sessionState.reset(resetSeqNum) // from header def ... eventually
|
|
250
312
|
this.setState(SessionState.NetworkConnectionEstablished)
|
|
251
313
|
}
|
|
252
314
|
|
|
@@ -254,7 +316,9 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
254
316
|
if (this.sessionState.state === SessionState.Stopped) {
|
|
255
317
|
return
|
|
256
318
|
}
|
|
257
|
-
|
|
319
|
+
if (this.timer) {
|
|
320
|
+
clearInterval(this.timer)
|
|
321
|
+
}
|
|
258
322
|
this.sessionLogger.info(`stop: kill transport`)
|
|
259
323
|
this.transport.end()
|
|
260
324
|
if (error) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IMsgApplication } from '../msg-application'
|
|
2
|
+
|
|
3
|
+
export interface ISessionDescription {
|
|
4
|
+
readonly application?: IMsgApplication
|
|
5
|
+
readonly Name: string
|
|
6
|
+
readonly Username: string
|
|
7
|
+
readonly Password: string
|
|
8
|
+
HeartBtInt: number
|
|
9
|
+
readonly SenderCompId: string
|
|
10
|
+
readonly TargetCompID: string
|
|
11
|
+
readonly ResetSeqNumFlag: boolean
|
|
12
|
+
readonly LastSentSeqNum?: number
|
|
13
|
+
readonly LastReceivedSeqNum?: number
|
|
14
|
+
readonly SenderSubID: string
|
|
15
|
+
readonly TargetSubID: string
|
|
16
|
+
readonly BeginString: string
|
|
17
|
+
readonly BodyLengthChars?: number,
|
|
18
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILooseObject } from '
|
|
2
|
-
import { IStandardHeader } from '
|
|
1
|
+
import { ILooseObject } from '../../collections/collection'
|
|
2
|
+
import { IStandardHeader } from '../../types/FIX4.4/repo'
|
|
3
3
|
import { ISessionDescription } from './session-description'
|
|
4
4
|
|
|
5
5
|
export interface ISessionMsgFactory {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export enum SessionState {
|
|
2
|
+
DisconnectedNoConnectionToday = 1,
|
|
3
|
+
DisconnectedConnectionToday = 2,
|
|
4
|
+
DetectBrokenNetworkConnection = 3,
|
|
5
|
+
AwaitingConnection = 4,
|
|
6
|
+
InitiateConnection = 5,
|
|
7
|
+
NetworkConnectionEstablished = 6,
|
|
8
|
+
InitiationLogonSent = 7,
|
|
9
|
+
InitiationLogonReceived = 8,
|
|
10
|
+
InitiationLogonResponse = 9,
|
|
11
|
+
HandleResendRequest = 10,
|
|
12
|
+
ReceiveMsgSeqNumTooHigh = 11,
|
|
13
|
+
AwaitingProcessingResponseToResendRequest = 12,
|
|
14
|
+
NoMessagesReceivedInInterval = 13,
|
|
15
|
+
AwaitingProcessingResponseToTestRequest = 14,
|
|
16
|
+
ReceiveLogout = 15,
|
|
17
|
+
InitiateLogout = 16,
|
|
18
|
+
ActiveNormalSession = 17,
|
|
19
|
+
WaitingForALogon = 18,
|
|
20
|
+
PeerLogonRejected = 20,
|
|
21
|
+
WaitingLogoutConfirm = 21,
|
|
22
|
+
ConfirmingLogout = 22,
|
|
23
|
+
Stopped = 23,
|
|
24
|
+
Idle = 24
|
|
25
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './recovering-tcp-initiator'
|
|
2
2
|
export * from './tcp-initiator'
|
|
3
3
|
export * from './tcp-acceptor'
|
|
4
|
-
export * from './initiator'
|
|
5
|
-
export * from './acceptor'
|
|
4
|
+
export * from './tcp-initiator-connector'
|
|
5
|
+
export * from './tcp-acceptor-listener'
|
|
6
|
+
export * from '../session/session-state'
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { IMsgApplication, ITcpTransportDescription } from '../session-description'
|
|
2
1
|
import { IJsFixConfig, IJsFixLogger } from '../../config'
|
|
3
|
-
import {
|
|
4
|
-
import { FixSession } from '../fix-session'
|
|
5
|
-
import { SessionState } from '../fix-session-state'
|
|
2
|
+
import { FixSession } from '../session/fix-session'
|
|
6
3
|
import { TcpInitiator } from './tcp-initiator'
|
|
7
|
-
import { MsgTransport } from '../
|
|
8
|
-
import * as events from 'events'
|
|
4
|
+
import { MsgTransport } from '../factory'
|
|
9
5
|
import Timeout = NodeJS.Timeout
|
|
6
|
+
import { SessionState } from '../session/session-state'
|
|
7
|
+
import { inject, injectable } from 'tsyringe'
|
|
8
|
+
import { DITokens } from '../../runtime/di-tokens'
|
|
9
|
+
import { ITcpTransportDescription } from './tcp-transport-description'
|
|
10
|
+
import { IMsgApplication } from '../msg-application'
|
|
11
|
+
import { FixEntity } from '../fix-entity'
|
|
10
12
|
|
|
11
13
|
/*
|
|
12
14
|
create one application session instance - and recover a lost transport. Hence the application
|
|
@@ -14,7 +16,8 @@ import Timeout = NodeJS.Timeout
|
|
|
14
16
|
last known sequence number or sequence reset.
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
@injectable()
|
|
20
|
+
export class RecoveringTcpInitiator extends FixEntity {
|
|
18
21
|
public tcp: ITcpTransportDescription
|
|
19
22
|
public session: FixSession
|
|
20
23
|
private readonly logger: IJsFixLogger
|
|
@@ -25,8 +28,8 @@ export class RecoveringTcpInitiator extends events.EventEmitter {
|
|
|
25
28
|
public recoveryAttemptSecs: number = 5
|
|
26
29
|
public backoffFailConnectSecs: number = 30
|
|
27
30
|
|
|
28
|
-
constructor (public readonly jsFixConfig: IJsFixConfig
|
|
29
|
-
super()
|
|
31
|
+
constructor (@inject(DITokens.IJsFixConfig) public readonly jsFixConfig: IJsFixConfig) {
|
|
32
|
+
super(jsFixConfig)
|
|
30
33
|
this.application = this.jsFixConfig.description.application
|
|
31
34
|
this.logger = jsFixConfig.logFactory.logger(`${this.application.name}:RecoveringTcpInitiator`)
|
|
32
35
|
if (!this.application) {
|
|
@@ -40,12 +43,12 @@ export class RecoveringTcpInitiator extends events.EventEmitter {
|
|
|
40
43
|
this.logger.error(e)
|
|
41
44
|
throw e
|
|
42
45
|
}
|
|
43
|
-
this.createSession(jsFixConfig
|
|
46
|
+
this.createSession(jsFixConfig)
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
private createSession (jsFixConfig: IJsFixConfig
|
|
47
|
-
this.logger.info(
|
|
48
|
-
this.session =
|
|
49
|
+
private createSession (jsFixConfig: IJsFixConfig) {
|
|
50
|
+
this.logger.info(`creating an application session with DI token ${DITokens.FixSession}.`)
|
|
51
|
+
this.session = jsFixConfig.sessionContainer.resolve<FixSession>(DITokens.FixSession)
|
|
49
52
|
this.session.on('done', () => {
|
|
50
53
|
this.logger.info('session has permanently ended')
|
|
51
54
|
this.emit('end', this)
|
|
@@ -66,6 +69,10 @@ export class RecoveringTcpInitiator extends events.EventEmitter {
|
|
|
66
69
|
this.emit('transport', transport)
|
|
67
70
|
this.logger.info(`initiator connects id ${(transport.id)}`)
|
|
68
71
|
const session = this.session
|
|
72
|
+
if (this.jsFixConfig.description.ResetSeqNumFlag) {
|
|
73
|
+
this.logger.info('reset sequence numbers')
|
|
74
|
+
session.reset()
|
|
75
|
+
}
|
|
69
76
|
session.setState(SessionState.NetworkConnectionEstablished)
|
|
70
77
|
session.run(transport).then((id: number) => {
|
|
71
78
|
if (!transport || id === transport.id) {
|
|
@@ -108,6 +115,10 @@ export class RecoveringTcpInitiator extends events.EventEmitter {
|
|
|
108
115
|
},this.recoveryAttemptSecs * 1000)
|
|
109
116
|
}
|
|
110
117
|
|
|
118
|
+
public start (): Promise<any> {
|
|
119
|
+
return this.run()
|
|
120
|
+
}
|
|
121
|
+
|
|
111
122
|
// for first connection - reject if no initial connection established within timeout
|
|
112
123
|
// once connection established, will not resolve until session is ended - i.e. lost
|
|
113
124
|
// connections are re-established using the same session instance.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IJsFixConfig } from '../../config'
|
|
2
|
+
import { FixAcceptor } from '../fix-acceptor'
|
|
3
|
+
import { TcpAcceptor } from './tcp-acceptor'
|
|
4
|
+
import { MsgTransport } from '../factory'
|
|
5
|
+
import { inject, injectable } from 'tsyringe'
|
|
6
|
+
import { FixSession } from '../session/fix-session'
|
|
7
|
+
import { DITokens } from '../../runtime/di-tokens'
|
|
8
|
+
import { FixEntity } from '../fix-entity'
|
|
9
|
+
|
|
10
|
+
@injectable()
|
|
11
|
+
export class TcpAcceptorListener extends FixEntity {
|
|
12
|
+
constructor (@inject(DITokens.IJsFixConfig) public readonly config: IJsFixConfig) {
|
|
13
|
+
super(config)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
start (): Promise<any> {
|
|
17
|
+
return new Promise<any>(async (accept, reject) => {
|
|
18
|
+
const logger = this.config.logFactory.logger('acceptor')
|
|
19
|
+
const sessionContainer = this.config.sessionContainer
|
|
20
|
+
if (!sessionContainer.isRegistered(DITokens.FixSession)) {
|
|
21
|
+
reject(new Error(`application must register a DI token '${DITokens.FixSession}' - see src/sample`))
|
|
22
|
+
}
|
|
23
|
+
logger.info('starting.')
|
|
24
|
+
const acceptor: FixAcceptor = sessionContainer.resolve<FixAcceptor>(TcpAcceptor)
|
|
25
|
+
acceptor.on('transport', (t: MsgTransport) => {
|
|
26
|
+
logger.info(`creates new transport using DI token ${DITokens.FixSession}.`)
|
|
27
|
+
const acceptorSession = sessionContainer.resolve<FixSession>(DITokens.FixSession)
|
|
28
|
+
acceptorSession.run(t).then(() => {
|
|
29
|
+
logger.info('ends')
|
|
30
|
+
acceptor.close(() => {
|
|
31
|
+
logger.info('acceptor closed.')
|
|
32
|
+
accept(true)
|
|
33
|
+
})
|
|
34
|
+
}).catch((e: Error) => {
|
|
35
|
+
logger.info(`error in session - close listener ${e.message}`)
|
|
36
|
+
acceptor.close(() => {
|
|
37
|
+
logger.info('acceptor closed.')
|
|
38
|
+
reject(e)
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
acceptor.listen()
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
}
|