fixcore-engine 0.1.6__tar.gz → 0.1.8__tar.gz
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.
- {fixcore_engine-0.1.6/fixcore_engine.egg-info → fixcore_engine-0.1.8}/PKG-INFO +1 -1
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/session/session.py +9 -7
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8/fixcore_engine.egg-info}/PKG-INFO +1 -1
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/pyproject.toml +1 -1
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/LICENSE +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/README.md +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/application.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/gui.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/gui_ui/app.js +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/gui_ui/fixcore_logo.svg +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/gui_ui/index.html +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/gui_ui/style.css +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/log/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/log/base.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/log/factory.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/log/file_log.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/log/screen.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/cracker.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/data_dictionary.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/exceptions.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/field.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/message/message.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/session/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/session/session_id.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/session/session_settings.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/session/state.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/store/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/store/base.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/store/factory.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/store/file_store.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/store/memory.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/transport/__init__.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/transport/acceptor.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/transport/framer.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore/transport/initiator.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore_engine.egg-info/SOURCES.txt +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore_engine.egg-info/dependency_links.txt +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore_engine.egg-info/entry_points.txt +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore_engine.egg-info/requires.txt +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/fixcore_engine.egg-info/top_level.txt +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/setup.cfg +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_cracker.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_data_dictionary.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_file_log.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_file_store.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_framer.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_integration.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_message.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_session.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_session_id.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_store.py +0 -0
- {fixcore_engine-0.1.6 → fixcore_engine-0.1.8}/tests/test_transport.py +0 -0
|
@@ -248,6 +248,7 @@ class Session:
|
|
|
248
248
|
# Acceptor: respond with Logon
|
|
249
249
|
await self._send_logon()
|
|
250
250
|
|
|
251
|
+
self._app.from_admin(msg, self._id)
|
|
251
252
|
self._state = SessionState.LOGGED_ON
|
|
252
253
|
self._app.on_logon(self._id)
|
|
253
254
|
self._log.on_event("Logon complete")
|
|
@@ -256,6 +257,8 @@ class Session:
|
|
|
256
257
|
text = msg.get_field_or(TAG_TEXT, "")
|
|
257
258
|
self._log.on_event(f"Received Logout{': ' + text if text else ''}")
|
|
258
259
|
|
|
260
|
+
self._app.from_admin(msg, self._id)
|
|
261
|
+
|
|
259
262
|
if self._state == SessionState.LOGOUT_TIMEOUT:
|
|
260
263
|
# We sent Logout first; counterparty confirmed — clean disconnect
|
|
261
264
|
self._state = SessionState.DISCONNECTED
|
|
@@ -317,7 +320,6 @@ class Session:
|
|
|
317
320
|
msg.header.set(TAG_MSG_TYPE, MSG_LOGON)
|
|
318
321
|
msg.set_field(TAG_ENCRYPT_METHOD, "0")
|
|
319
322
|
msg.set_field(TAG_HEART_BT_INT, str(self._heartbt_int))
|
|
320
|
-
self._app.to_admin(msg, self._id)
|
|
321
323
|
logger.debug("[%s] _send_logon: calling _send_message", self._id)
|
|
322
324
|
await self._send_message(msg, is_admin=True)
|
|
323
325
|
self._logon_sent_at = time.monotonic()
|
|
@@ -328,7 +330,6 @@ class Session:
|
|
|
328
330
|
msg.header.set(TAG_MSG_TYPE, MSG_LOGOUT)
|
|
329
331
|
if text:
|
|
330
332
|
msg.set_field(TAG_TEXT, text)
|
|
331
|
-
self._app.to_admin(msg, self._id)
|
|
332
333
|
await self._send_message(msg, is_admin=True)
|
|
333
334
|
self._state = SessionState.LOGOUT_TIMEOUT
|
|
334
335
|
|
|
@@ -337,14 +338,12 @@ class Session:
|
|
|
337
338
|
msg.header.set(TAG_MSG_TYPE, MSG_HEARTBEAT)
|
|
338
339
|
if test_req_id:
|
|
339
340
|
msg.set_field(TAG_TEST_REQ_ID, test_req_id)
|
|
340
|
-
self._app.to_admin(msg, self._id)
|
|
341
341
|
await self._send_message(msg, is_admin=True)
|
|
342
342
|
|
|
343
343
|
async def _send_test_request(self, test_req_id: str) -> None:
|
|
344
344
|
msg = Message()
|
|
345
345
|
msg.header.set(TAG_MSG_TYPE, MSG_TEST_REQUEST)
|
|
346
346
|
msg.set_field(TAG_TEST_REQ_ID, test_req_id)
|
|
347
|
-
self._app.to_admin(msg, self._id)
|
|
348
347
|
await self._send_message(msg, is_admin=True)
|
|
349
348
|
self._test_req_id = test_req_id
|
|
350
349
|
self._test_req_sent_at = time.monotonic()
|
|
@@ -354,7 +353,6 @@ class Session:
|
|
|
354
353
|
msg.header.set(TAG_MSG_TYPE, MSG_RESEND_REQUEST)
|
|
355
354
|
msg.set_field(TAG_BEGIN_SEQ_NO, str(begin_seq))
|
|
356
355
|
msg.set_field(TAG_END_SEQ_NO, str(end_seq))
|
|
357
|
-
self._app.to_admin(msg, self._id)
|
|
358
356
|
await self._send_message(msg, is_admin=True)
|
|
359
357
|
|
|
360
358
|
async def _send_sequence_reset(self, new_seq_no: int, gap_fill: bool = False) -> None:
|
|
@@ -384,7 +382,6 @@ class Session:
|
|
|
384
382
|
msg.set_field(TAG_SESSION_REJECT_REASON, str(reason))
|
|
385
383
|
if text:
|
|
386
384
|
msg.set_field(TAG_TEXT, text)
|
|
387
|
-
self._app.to_admin(msg, self._id)
|
|
388
385
|
await self._send_message(msg, is_admin=True)
|
|
389
386
|
|
|
390
387
|
# ------------------------------------------------------------------
|
|
@@ -437,7 +434,7 @@ class Session:
|
|
|
437
434
|
# ------------------------------------------------------------------
|
|
438
435
|
|
|
439
436
|
async def _send_message(self, msg: Message, *, is_admin: bool) -> None:
|
|
440
|
-
"""Stamp header, store, log, and transmit *msg*."""
|
|
437
|
+
"""Stamp header, call app callback, store, log, and transmit *msg*."""
|
|
441
438
|
seq_num = self._store.next_sender_msg_seq_num()
|
|
442
439
|
msg.header.set(TAG_BEGIN_STRING, self._id.begin_string)
|
|
443
440
|
msg.header.set(TAG_SENDER_COMP_ID, self._id.sender_comp_id)
|
|
@@ -445,6 +442,11 @@ class Session:
|
|
|
445
442
|
msg.header.set(TAG_MSG_SEQ_NUM, str(seq_num))
|
|
446
443
|
msg.header.set(TAG_SENDING_TIME, _utc_timestamp())
|
|
447
444
|
|
|
445
|
+
if is_admin:
|
|
446
|
+
self._app.to_admin(msg, self._id)
|
|
447
|
+
else:
|
|
448
|
+
self._app.to_app(msg, self._id)
|
|
449
|
+
|
|
448
450
|
raw = msg.encode()
|
|
449
451
|
logger.debug("[%s] _send_message: seq=%s len=%d", self._id, seq_num, len(raw))
|
|
450
452
|
self._store.set(seq_num, raw)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|