jspurefix 5.10.4 → 5.10.6
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/ATDL_PLAN.md +82 -14
- package/README.md +24 -0
- package/dist/buffer/elastic-buffer.js +3 -3
- package/dist/buffer/elastic-buffer.js.map +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.d.ts +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.js +2 -2
- package/dist/transport/ascii/ascii-session-msg-factory.js.map +1 -1
- package/dist/transport/ascii/ascii-session.d.ts +6 -0
- package/dist/transport/ascii/ascii-session.js +72 -8
- package/dist/transport/ascii/ascii-session.js.map +1 -1
- package/dist/transport/session/fix-session.d.ts +1 -1
- package/dist/transport/session/fix-session.js.map +1 -1
- package/jsfix.test_client.txt +62 -62
- package/jsfix.test_server.txt +72 -72
- package/package.json +1 -1
- package/src/buffer/elastic-buffer.ts +13 -3
- package/src/transport/ascii/ascii-session-msg-factory.ts +8 -2
- package/src/transport/ascii/ascii-session.ts +115 -7
- package/src/transport/session/fix-session.ts +12 -2
package/jsfix.test_client.txt
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
2
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
3
|
-
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
4
|
-
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=
|
|
5
|
-
8=FIX.4.4|9=
|
|
6
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
7
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
8
|
-
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
9
|
-
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=
|
|
10
|
-
8=FIX.4.4|9=
|
|
11
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
12
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
13
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
14
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
15
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
16
|
-
8=FIX.4.4|9=
|
|
17
|
-
8=FIX.4.4|9=
|
|
18
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
19
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
20
|
-
8=FIX.4.4|9=
|
|
21
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
22
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
23
|
-
8=FIX.4.4|9=
|
|
24
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
25
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=
|
|
26
|
-
8=FIX.4.4|9=
|
|
27
|
-
8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
28
|
-
8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
29
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
30
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
31
|
-
8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
32
|
-
8=FIX.4.4|9=
|
|
33
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
34
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
35
|
-
8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
36
|
-
8=FIX.4.4|9=
|
|
37
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
38
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
39
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
40
|
-
8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
41
|
-
8=FIX.4.4|9=
|
|
42
|
-
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
43
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
44
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
45
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=
|
|
46
|
-
8=FIX.4.4|9=
|
|
47
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
48
|
-
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
49
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
50
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=
|
|
51
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=
|
|
52
|
-
8=FIX.4.4|9=
|
|
53
|
-
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
54
|
-
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
55
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
56
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=
|
|
57
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
58
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=
|
|
59
|
-
8=FIX.4.4|9=
|
|
60
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
61
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
62
|
-
8=FIX.4.4|9=
|
|
1
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:50.575|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=109|
|
|
2
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:50.580|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=153|
|
|
3
|
+
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:50.581|7=1|16=1|10=241|
|
|
4
|
+
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260813-18:45:50.585|122=20260813-18:45:50.585|123=Y|36=2|10=121|
|
|
5
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:45:52.585|58=test_server confirming logout|10=094|
|
|
6
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:55.321|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=103|
|
|
7
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:55.322|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=152|
|
|
8
|
+
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:55.323|7=1|16=0|10=239|
|
|
9
|
+
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260813-18:45:55.326|122=20260813-18:45:55.325|123=Y|36=2|10=116|
|
|
10
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:45:57.325|58=test_server confirming logout|10=091|
|
|
11
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:59.752|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=115|
|
|
12
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:59.754|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=165|
|
|
13
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:59.754|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=118|
|
|
14
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:00.237|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=100|
|
|
15
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:00.238|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=149|
|
|
16
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:01.240|58=test_server confirming logout|10=077|
|
|
17
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:01.755|58=test_client initiate logout|10=106|
|
|
18
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:03.991|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=110|
|
|
19
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:03.993|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=160|
|
|
20
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:04.996|58=test_server confirming logout|10=098|
|
|
21
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:07.682|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=111|
|
|
22
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:07.683|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=160|
|
|
23
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=0|57=fix|52=20260813-18:46:08.685|58=test_client initiate logout|10=112|
|
|
24
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:11.141|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=096|
|
|
25
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=20260813-18:46:11.142|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=149|
|
|
26
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:12.144|58=test_server confirming logout|10=082|
|
|
27
|
+
8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:14.575|98=0|141=Y|553=js-client|554=pwd-client|10=178|
|
|
28
|
+
8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:14.576|45=1|372=A|373=1|58=msgType A missing required tag 108|10=012|
|
|
29
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:19.124|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=105|
|
|
30
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:19.126|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
|
|
31
|
+
8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:19.128|45=2|372=ZZ|373=11|58=msgType ZZ unknown|10=158|
|
|
32
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:21.129|58=test_server confirming logout|10=086|
|
|
33
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:23.830|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
|
|
34
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:23.831|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=153|
|
|
35
|
+
8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:23.833|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 143|10=077|
|
|
36
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:25.834|58=test_server confirming logout|10=093|
|
|
37
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:27.832|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=110|
|
|
38
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:32.276|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=108|
|
|
39
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:32.277|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=157|
|
|
40
|
+
8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:32.278|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 59|10=037|
|
|
41
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:34.279|58=test_server confirming logout|10=096|
|
|
42
|
+
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:36.711|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=056|
|
|
43
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:36.712|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
|
|
44
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:38.716|112=Thu, 13 Aug 2026 18:46:38 GMT|10=168|
|
|
45
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:40.718|112=Thu, 13 Aug 2026 18:46:40 GMT|10=157|
|
|
46
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:42.714|58=test_server confirming logout|10=088|
|
|
47
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:45.140|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=102|
|
|
48
|
+
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:45.141|98=0|108=2|141=Y|553=js-server|554=pwd-server|10=101|
|
|
49
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:47.145|112=Thu, 13 Aug 2026 18:46:47 GMT|10=164|
|
|
50
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:49.148|112=Thu, 13 Aug 2026 18:46:49 GMT|10=172|
|
|
51
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=20260813-18:46:51.152|112=Thu, 13 Aug 2026 18:46:51 GMT|10=154|
|
|
52
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=5|57=fix|52=20260813-18:46:53.142|58=test_server confirming logout|10=088|
|
|
53
|
+
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:55.578|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=068|
|
|
54
|
+
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:55.579|98=0|108=5|141=Y|553=js-server|554=pwd-server|10=120|
|
|
55
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:57.582|112=Thu, 13 Aug 2026 18:46:57 GMT|10=171|
|
|
56
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:59.586|112=Thu, 13 Aug 2026 18:46:59 GMT|10=180|
|
|
57
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:47:00.588|112=Thu, 13 Aug 2026 18:47:00 GMT|10=155|
|
|
58
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=20260813-18:47:01.590|112=Thu, 13 Aug 2026 18:47:01 GMT|10=152|
|
|
59
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:47:03.580|58=test_server confirming logout|10=088|
|
|
60
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:49:02.282|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=105|
|
|
61
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:49:02.290|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=152|
|
|
62
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:49:03.296|58=test_server confirming logout|10=093|
|
package/jsfix.test_server.txt
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
2
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
3
|
-
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
4
|
-
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=
|
|
5
|
-
8=FIX.4.4|9=
|
|
6
|
-
8=FIX.4.4|9=
|
|
7
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
8
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
9
|
-
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
10
|
-
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=
|
|
11
|
-
8=FIX.4.4|9=
|
|
12
|
-
8=FIX.4.4|9=
|
|
13
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
14
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
15
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
16
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
17
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
18
|
-
8=FIX.4.4|9=
|
|
19
|
-
8=FIX.4.4|9=
|
|
20
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
21
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
22
|
-
8=FIX.4.4|9=
|
|
23
|
-
8=FIX.4.4|9=
|
|
24
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
25
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
26
|
-
8=FIX.4.4|9=
|
|
27
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
28
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=
|
|
29
|
-
8=FIX.4.4|9=
|
|
30
|
-
8=FIX.4.4|9=
|
|
31
|
-
8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
32
|
-
8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
33
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
34
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
1
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:50.575|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=109|
|
|
2
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:50.580|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=153|
|
|
3
|
+
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:50.581|7=1|16=1|10=241|
|
|
4
|
+
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260813-18:45:50.585|122=20260813-18:45:50.585|123=Y|36=2|10=121|
|
|
5
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:45:52.583|58=test_client initiate logout|10=110|
|
|
6
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:45:52.585|58=test_server confirming logout|10=094|
|
|
7
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:55.321|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=103|
|
|
8
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:55.322|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=152|
|
|
9
|
+
8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:55.323|7=1|16=0|10=239|
|
|
10
|
+
8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260813-18:45:55.326|122=20260813-18:45:55.325|123=Y|36=2|10=116|
|
|
11
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:45:57.324|58=test_client initiate logout|10=108|
|
|
12
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:45:57.325|58=test_server confirming logout|10=091|
|
|
13
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:45:59.752|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=115|
|
|
14
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:45:59.754|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=165|
|
|
15
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:45:59.754|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=118|
|
|
16
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:00.237|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=100|
|
|
17
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:00.238|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=149|
|
|
18
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:01.239|58=test_client initiate logout|10=102|
|
|
19
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:01.240|58=test_server confirming logout|10=077|
|
|
20
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:03.991|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=110|
|
|
21
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:03.993|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=160|
|
|
22
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:04.995|58=test_client initiate logout|10=114|
|
|
23
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:04.996|58=test_server confirming logout|10=098|
|
|
24
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:07.682|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=111|
|
|
25
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:07.683|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=160|
|
|
26
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=0|57=fix|52=20260813-18:46:08.685|58=test_client initiate logout|10=112|
|
|
27
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:11.141|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=096|
|
|
28
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=20260813-18:46:11.142|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=149|
|
|
29
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:12.143|58=test_client initiate logout|10=098|
|
|
30
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:12.144|58=test_server confirming logout|10=082|
|
|
31
|
+
8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:14.575|98=0|141=Y|553=js-client|554=pwd-client|10=178|
|
|
32
|
+
8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:14.576|45=1|372=A|373=1|58=msgType A missing required tag 108|10=012|
|
|
33
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:19.124|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=105|
|
|
34
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:19.126|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
|
|
35
35
|
8=FIX4.4|9=0000136|35=ZZ|49=init-comp|56=accept-comp|34=2|57=fix|52=20180902-12:25:28.980|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=177|
|
|
36
|
-
8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
37
|
-
8=FIX.4.4|9=
|
|
38
|
-
8=FIX.4.4|9=
|
|
39
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
40
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
36
|
+
8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:19.128|45=2|372=ZZ|373=11|58=msgType ZZ unknown|10=158|
|
|
37
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:21.128|58=test_client initiate logout|10=102|
|
|
38
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:21.129|58=test_server confirming logout|10=086|
|
|
39
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:23.830|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
|
|
40
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:23.831|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=153|
|
|
41
41
|
8=FIX4.4|9=0000123|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20180902-12:25:59.161|999=Sun, 02 Sep 2018 12:25:59 GMT|10=95|
|
|
42
|
-
8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
43
|
-
8=FIX.4.4|9=
|
|
44
|
-
8=FIX.4.4|9=
|
|
45
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
46
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
42
|
+
8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:23.833|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 143|10=077|
|
|
43
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:25.833|58=test_client initiate logout|10=109|
|
|
44
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:25.834|58=test_server confirming logout|10=093|
|
|
45
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:32.276|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=108|
|
|
46
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:32.277|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=157|
|
|
47
47
|
8=FIX4.4|9=0000123|35=0|49=init-not!|56=accept-comp|34=2|57=fix|52=20180902-12:25:59.161|112=Sun, 02 Sep 2018 12:25:59 GMT|10=95|
|
|
48
|
-
8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
49
|
-
8=FIX.4.4|9=
|
|
50
|
-
8=FIX.4.4|9=
|
|
51
|
-
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
52
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
53
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
54
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=
|
|
55
|
-
8=FIX.4.4|9=
|
|
56
|
-
8=FIX.4.4|9=
|
|
57
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
58
|
-
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
59
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
60
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=
|
|
61
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=
|
|
62
|
-
8=FIX.4.4|9=
|
|
63
|
-
8=FIX.4.4|9=
|
|
64
|
-
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
65
|
-
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
66
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=
|
|
67
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=
|
|
68
|
-
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=
|
|
69
|
-
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=
|
|
70
|
-
8=FIX.4.4|9=
|
|
71
|
-
8=FIX.4.4|9=
|
|
72
|
-
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=
|
|
73
|
-
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=
|
|
74
|
-
8=FIX.4.4|9=
|
|
75
|
-
8=FIX.4.4|9=
|
|
48
|
+
8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:32.278|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 59|10=037|
|
|
49
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:34.278|58=test_client initiate logout|10=112|
|
|
50
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:34.279|58=test_server confirming logout|10=096|
|
|
51
|
+
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:36.711|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=056|
|
|
52
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:36.712|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
|
|
53
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:38.716|112=Thu, 13 Aug 2026 18:46:38 GMT|10=168|
|
|
54
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:40.718|112=Thu, 13 Aug 2026 18:46:40 GMT|10=157|
|
|
55
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=4|57=fix|52=20260813-18:46:42.713|58=test_client initiate logout|10=106|
|
|
56
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:42.714|58=test_server confirming logout|10=088|
|
|
57
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:45.140|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=102|
|
|
58
|
+
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:45.141|98=0|108=2|141=Y|553=js-server|554=pwd-server|10=101|
|
|
59
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:46:47.145|112=Thu, 13 Aug 2026 18:46:47 GMT|10=164|
|
|
60
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:46:49.148|112=Thu, 13 Aug 2026 18:46:49 GMT|10=172|
|
|
61
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=20260813-18:46:51.152|112=Thu, 13 Aug 2026 18:46:51 GMT|10=154|
|
|
62
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:53.141|58=test_client initiate logout|10=101|
|
|
63
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=5|57=fix|52=20260813-18:46:53.142|58=test_server confirming logout|10=088|
|
|
64
|
+
8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:46:55.578|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=068|
|
|
65
|
+
8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:46:55.579|98=0|108=5|141=Y|553=js-server|554=pwd-server|10=120|
|
|
66
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:46:57.582|112=Thu, 13 Aug 2026 18:46:57 GMT|10=171|
|
|
67
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260813-18:46:59.586|112=Thu, 13 Aug 2026 18:46:59 GMT|10=180|
|
|
68
|
+
8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:47:00.588|112=Thu, 13 Aug 2026 18:47:00 GMT|10=155|
|
|
69
|
+
8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=20260813-18:47:01.590|112=Thu, 13 Aug 2026 18:47:01 GMT|10=152|
|
|
70
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=5|57=fix|52=20260813-18:47:03.579|58=test_client initiate logout|10=115|
|
|
71
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260813-18:47:03.580|58=test_server confirming logout|10=088|
|
|
72
|
+
8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260813-18:49:02.282|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=105|
|
|
73
|
+
8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260813-18:49:02.290|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=152|
|
|
74
|
+
8=FIX.4.4|9=0000101|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260813-18:49:03.294|58=test_client initiate logout|10=108|
|
|
75
|
+
8=FIX.4.4|9=0000103|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260813-18:49:03.296|58=test_server confirming logout|10=093|
|
package/package.json
CHANGED
|
@@ -9,8 +9,18 @@ export class ElasticBuffer {
|
|
|
9
9
|
private ptr: number = 0
|
|
10
10
|
private stretched: number
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* A buffer grown to serve a large message keeps that capacity across reset, so a
|
|
14
|
+
* steady stream of similarly sized messages does not re-grow (and re-allocate) on
|
|
15
|
+
* every single message. Only a buffer that has ballooned past returnTo is handed
|
|
16
|
+
* back, so one pathological message cannot pin a large allocation for the life of
|
|
17
|
+
* the session. Unlike cspurefix - where the discarded array goes to a shared
|
|
18
|
+
* ArrayPool - the retained bytes are held by this instance, so an acceptor with
|
|
19
|
+
* many connections holds up to this much per connection. Tune with
|
|
20
|
+
* DITokens.elasticBufferReturnSize.
|
|
21
|
+
*/
|
|
12
22
|
constructor (@inject(DITokens.elasticBufferSize) public readonly size: number = 6 * 1024,
|
|
13
|
-
@inject(DITokens.elasticBufferReturnSize) public readonly returnTo: number =
|
|
23
|
+
@inject(DITokens.elasticBufferReturnSize) public readonly returnTo: number = 64 * 1024) {
|
|
14
24
|
this.size = Math.max(1, this.size)
|
|
15
25
|
this.buffer = Buffer.allocUnsafe(this.size)
|
|
16
26
|
this.returnTo = Math.max(this.size, this.returnTo)
|
|
@@ -43,7 +53,7 @@ export class ElasticBuffer {
|
|
|
43
53
|
|
|
44
54
|
public setPos (ptr: number): number {
|
|
45
55
|
const r = this.ptr
|
|
46
|
-
if (ptr >= 0 && ptr <= this.
|
|
56
|
+
if (ptr >= 0 && ptr <= this.buffer.length) {
|
|
47
57
|
this.ptr = ptr
|
|
48
58
|
}
|
|
49
59
|
return r
|
|
@@ -134,7 +144,7 @@ export class ElasticBuffer {
|
|
|
134
144
|
const shrink = this.stretched > this.returnTo
|
|
135
145
|
if (shrink) {
|
|
136
146
|
this.buffer = Buffer.allocUnsafe(this.returnTo)
|
|
137
|
-
this.stretched = this.
|
|
147
|
+
this.stretched = this.returnTo
|
|
138
148
|
}
|
|
139
149
|
return shrink
|
|
140
150
|
}
|
|
@@ -33,11 +33,17 @@ export class AsciiSessionMsgFactory extends ASessionMsgFactory {
|
|
|
33
33
|
return this.mutate(o, MsgType.Logon)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* ISessionMsgFactory declares logout (msgType, text) and FixSession calls it that
|
|
38
|
+
* way. This override used to take the text alone, so it silently bound the msg
|
|
39
|
+
* type to Text and every Logout jspurefix sent carried '58=5' in place of the
|
|
40
|
+
* reason - the caller's message was dropped on the floor.
|
|
41
|
+
*/
|
|
42
|
+
public logout (msgType: string, text: string): ILooseObject {
|
|
37
43
|
const o: ILogout = {
|
|
38
44
|
Text: text
|
|
39
45
|
} as ILogout
|
|
40
|
-
return this.mutate(o, MsgType.Logout)
|
|
46
|
+
return this.mutate(o, msgType ?? MsgType.Logout)
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
public header (msgType: string, seqNum: number, time: Date, overrideData?: Partial<IStandardHeader>): ILooseObject {
|
|
@@ -37,6 +37,7 @@ export abstract class AsciiSession extends FixSession {
|
|
|
37
37
|
protected readonly wildcardTarget: boolean
|
|
38
38
|
private identityBound: boolean
|
|
39
39
|
private bindInProgress: boolean = false
|
|
40
|
+
private logonVerdictPending: boolean = false
|
|
40
41
|
private readonly pendingRx: Array<{ msgType: string, view: MsgView }> = []
|
|
41
42
|
private readonly clock: DefaultFixClock = new DefaultFixClock()
|
|
42
43
|
|
|
@@ -548,6 +549,13 @@ export abstract class AsciiSession extends FixSession {
|
|
|
548
549
|
this.onMsgBeforeIdentity(msgType, view)
|
|
549
550
|
return
|
|
550
551
|
}
|
|
552
|
+
if (this.logonVerdictPending) {
|
|
553
|
+
// the application is still deciding whether to accept this peer - hold anything
|
|
554
|
+
// it sends in the meantime rather than acting on it (see awaitLogonVerdict)
|
|
555
|
+
this.sessionLogger.info(`queueing '${msgType}' received while awaiting logon verdict`)
|
|
556
|
+
this.pendingRx.push({ msgType, view: view.clone() })
|
|
557
|
+
return
|
|
558
|
+
}
|
|
551
559
|
this.dispatchMsg(msgType, view)
|
|
552
560
|
}
|
|
553
561
|
|
|
@@ -587,9 +595,11 @@ export abstract class AsciiSession extends FixSession {
|
|
|
587
595
|
this.bindIdentity(peerCompId).then(() => {
|
|
588
596
|
this.bindInProgress = false
|
|
589
597
|
this.identityBound = true
|
|
598
|
+
// dispatching the logon can itself open a second gate - an application whose
|
|
599
|
+
// onLogon returns a promise is now deciding - so let resumeRx work out whether
|
|
600
|
+
// it is actually safe to let the socket run again
|
|
590
601
|
this.dispatchMsg(MsgType.Logon, logon)
|
|
591
|
-
this.
|
|
592
|
-
this.transport?.duplex.readable?.resume()
|
|
602
|
+
this.resumeRx()
|
|
593
603
|
}).catch((e: Error) => {
|
|
594
604
|
this.bindInProgress = false
|
|
595
605
|
this.pendingRx.length = 0
|
|
@@ -597,8 +607,34 @@ export abstract class AsciiSession extends FixSession {
|
|
|
597
607
|
})
|
|
598
608
|
}
|
|
599
609
|
|
|
610
|
+
/**
|
|
611
|
+
* True while an asynchronous step in the logon handshake is still running and no
|
|
612
|
+
* received message may be acted on: either the identity bind of a wildcard acceptor
|
|
613
|
+
* or an application still deciding the logon verdict.
|
|
614
|
+
*/
|
|
615
|
+
private rxGated (): boolean {
|
|
616
|
+
return this.bindInProgress || this.logonVerdictPending
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Let the socket run again now a gate has opened - but only if no other gate is
|
|
621
|
+
* still shut. Draining can re-gate (a replayed message could start another async
|
|
622
|
+
* step) so the check is repeated after the queue is played out; whichever gate
|
|
623
|
+
* closes last is the one that resumes.
|
|
624
|
+
*/
|
|
625
|
+
private resumeRx (): void {
|
|
626
|
+
if (this.rxGated()) return
|
|
627
|
+
this.drainPendingRx()
|
|
628
|
+
if (this.rxGated()) return
|
|
629
|
+
this.transport?.duplex.readable?.resume()
|
|
630
|
+
}
|
|
631
|
+
|
|
600
632
|
private drainPendingRx (): void {
|
|
601
633
|
while (this.pendingRx.length > 0) {
|
|
634
|
+
if (this.rxGated()) {
|
|
635
|
+
this.sessionLogger.info('suspending replay - logon handshake gated again')
|
|
636
|
+
return
|
|
637
|
+
}
|
|
602
638
|
const queued = this.pendingRx.shift()
|
|
603
639
|
if (!queued) break
|
|
604
640
|
if (this.sessionState.state === SessionState.Stopped) {
|
|
@@ -734,9 +770,66 @@ export abstract class AsciiSession extends FixSession {
|
|
|
734
770
|
const state = this.sessionState
|
|
735
771
|
state.peerHeartBeatSecs = view.getTyped(MsgTag.HeartBtInt) as number
|
|
736
772
|
state.peerCompId = view.getTyped(MsgTag.SenderCompID) as string
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
773
|
+
|
|
774
|
+
const verdict = this.onLogon(view, userName as string, password as string)
|
|
775
|
+
if (typeof verdict === 'boolean') {
|
|
776
|
+
// the common case - finish the handshake in this same event, so an application
|
|
777
|
+
// with a synchronous onLogon sees exactly the timing it always has
|
|
778
|
+
this.completePeerLogon(view, verdict, resetSeqNumFlag)
|
|
779
|
+
return
|
|
780
|
+
}
|
|
781
|
+
this.awaitLogonVerdict(view, verdict, resetSeqNumFlag)
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* onLogon handed back a promise - the application is checking the credentials
|
|
786
|
+
* against something asynchronous. Nothing may be sent or acted on until it
|
|
787
|
+
* answers, so pause the socket and queue whatever the peer says in the meantime.
|
|
788
|
+
*
|
|
789
|
+
* The view has to be cloned: AsciiParser recycles its tag index and buffer as soon
|
|
790
|
+
* as the current event returns, so the original is meaningless by the time the
|
|
791
|
+
* promise settles. Anything already read off it - peerReset here - is carried
|
|
792
|
+
* across as a value rather than read again from the clone.
|
|
793
|
+
*/
|
|
794
|
+
private awaitLogonVerdict (view: MsgView, verdict: Promise<boolean>, peerReset: boolean | undefined): void {
|
|
795
|
+
const logger = this.sessionLogger
|
|
796
|
+
logger.info('onLogon returned a promise - awaiting logon verdict')
|
|
797
|
+
this.logonVerdictPending = true
|
|
798
|
+
const logon = view.clone()
|
|
799
|
+
this.transport?.duplex.readable?.pause()
|
|
800
|
+
|
|
801
|
+
verdict.then((accepted: boolean) => {
|
|
802
|
+
this.logonVerdictPending = false
|
|
803
|
+
if (this.sessionState.state === SessionState.Stopped) {
|
|
804
|
+
logger.info('session stopped while awaiting logon verdict - discarding')
|
|
805
|
+
this.pendingRx.length = 0
|
|
806
|
+
return
|
|
807
|
+
}
|
|
808
|
+
this.completePeerLogon(logon, accepted, peerReset)
|
|
809
|
+
if (!accepted) {
|
|
810
|
+
// completePeerLogon has torn the session down - nothing queued can be acted on
|
|
811
|
+
this.pendingRx.length = 0
|
|
812
|
+
return
|
|
813
|
+
}
|
|
814
|
+
this.resumeRx()
|
|
815
|
+
}).catch((e: Error) => {
|
|
816
|
+
this.logonVerdictPending = false
|
|
817
|
+
this.pendingRx.length = 0
|
|
818
|
+
// a credential check that throws is a refusal, not a reason to let the peer in
|
|
819
|
+
this.rejectLogon(`onLogon failed: ${e.message}`)
|
|
820
|
+
})
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* The application has accepted or refused the peer - finish the handshake either way.
|
|
825
|
+
*/
|
|
826
|
+
private completePeerLogon (view: MsgView, accepted: boolean, peerReset: boolean | undefined): void {
|
|
827
|
+
const logger = this.sessionLogger
|
|
828
|
+
logger.info(`peerLogon onLogon returns ${accepted}`)
|
|
829
|
+
if (!accepted) {
|
|
830
|
+
this.rejectLogon('logon rejected by application')
|
|
831
|
+
return
|
|
832
|
+
}
|
|
740
833
|
if (this.acceptor) {
|
|
741
834
|
this.setState(SessionState.InitiationLogonResponse)
|
|
742
835
|
logger.info('acceptor responds to logon request')
|
|
@@ -745,7 +838,7 @@ export abstract class AsciiSession extends FixSession {
|
|
|
745
838
|
// reset our sequences before sending our logon response.
|
|
746
839
|
// This handles the broker-reset pattern where client sends N, we respond with Y.
|
|
747
840
|
const weReset = this.config.description.ResetSeqNumFlag
|
|
748
|
-
if (weReset &&
|
|
841
|
+
if (weReset && peerReset !== true) {
|
|
749
842
|
logger.info('acceptor sending ResetSeqNumFlag=Y (peer sent N), resetting sequences')
|
|
750
843
|
// Fire-and-forget async coordinator call, set values synchronously
|
|
751
844
|
this.coordinator.resetAsAcceptor().catch((e: Error) => {
|
|
@@ -764,7 +857,7 @@ export abstract class AsciiSession extends FixSession {
|
|
|
764
857
|
}
|
|
765
858
|
}
|
|
766
859
|
|
|
767
|
-
this.sendLogon()
|
|
860
|
+
this.sendLogon()
|
|
768
861
|
} else { // as an initiator the acceptor has responded
|
|
769
862
|
logger.info('initiator receives logon response')
|
|
770
863
|
this.setState(SessionState.InitiationLogonReceived)
|
|
@@ -779,6 +872,21 @@ export abstract class AsciiSession extends FixSession {
|
|
|
779
872
|
this.onReady(view)
|
|
780
873
|
}
|
|
781
874
|
|
|
875
|
+
/**
|
|
876
|
+
* The application refused this peer. FIX expects the refusing side to say why and
|
|
877
|
+
* then hang up rather than simply going quiet, so send a Logout carrying the reason
|
|
878
|
+
* before dropping the transport - the order matters, send() discards anything
|
|
879
|
+
* offered once the session has stopped.
|
|
880
|
+
*
|
|
881
|
+
* onReady is never reached and no heartbeat timer starts; the application learns the
|
|
882
|
+
* outcome through onStopped(error).
|
|
883
|
+
*/
|
|
884
|
+
private rejectLogon (reason: string): void {
|
|
885
|
+
this.sessionLogger.warning(`refusing peer logon: ${reason}`)
|
|
886
|
+
this.sendLogout(reason)
|
|
887
|
+
this.terminate(new Error(reason))
|
|
888
|
+
}
|
|
889
|
+
|
|
782
890
|
private sendTestRequest (): void {
|
|
783
891
|
const factory = this.config.factory
|
|
784
892
|
this.setState(SessionState.AwaitingProcessingResponseToTestRequest)
|
|
@@ -631,11 +631,21 @@ export abstract class FixSession extends events.EventEmitter {
|
|
|
631
631
|
*/
|
|
632
632
|
protected abstract onStopped (error?: Error): void
|
|
633
633
|
/**
|
|
634
|
-
*
|
|
634
|
+
* Inform the application of a peer login attempt and ask it to accept or reject.
|
|
635
|
+
*
|
|
636
|
+
* Return true to let the session continue. Return false to refuse the peer: a
|
|
637
|
+
* Logout carrying a Text reason is sent and the transport is dropped, so onReady
|
|
638
|
+
* is never reached and no heartbeat is started.
|
|
639
|
+
*
|
|
640
|
+
* The verdict may be returned as a promise, for applications that must check the
|
|
641
|
+
* credentials against an async source such as an http api or a database. While
|
|
642
|
+
* that promise is pending the transport is paused and any message the peer sends
|
|
643
|
+
* is queued, then replayed in order once the verdict arrives.
|
|
644
|
+
*
|
|
635
645
|
* @param view the login message
|
|
636
646
|
* @param user extracted user from message
|
|
637
647
|
* @param password extracted password from the message.
|
|
638
648
|
* @protected
|
|
639
649
|
*/
|
|
640
|
-
protected abstract onLogon (view: MsgView, user: string, password: string): boolean
|
|
650
|
+
protected abstract onLogon (view: MsgView, user: string, password: string): boolean | Promise<boolean>
|
|
641
651
|
}
|