diff --git a/.efrocachemap b/.efrocachemap index 8b8b4826..233ed701 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4003,50 +4003,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/1c/77/ac670a5118abdf8a7687af0e159b", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1e/d0/6b84a33d4287a32c52c764f29392", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/52/db/77a474ca35543089c086155f23c4", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c5/a5/782b24abf1db6f50d69ac54e81ec", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d6/a2/9bf9703a75df5063f35b7cc5750b", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a9/56/320d7613c365377e919b99069cce", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/04/01/bb72dd95b0cab81bfae9dfaa610f", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a0/a4/960039a1ad2b837dfb6b2e1250d5", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c6/5e/e50ee6a4b5541d38cd7817cb4568", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/88/c2/0569c9d3e96026a16b0fd259b9be", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0e/44/6f0ba90dcbf281b8191565258ba6", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/81/5c/2236ece73ff75a665d6926666f7e", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d9/f4/0ee8715080cf1257e7b15a37d2fc", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5a/70/4a5cb92c0398fcf2a4ca0a88de97", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/98/e1/28e5cb47bf4385eae7f6392fe6f7", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6d/3e/85e41ffa51905158a78e3a8dd6f1", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6e/b5/8fa7aa16af796902e0db898b2f05", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e3/99/ed98e504a0b0db8ef47d2294e539", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d4/3b/f7f31ce6b8135cc66a4a5df91cb7", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/21/b9/7efcc0d9dc7ed88ea500be59a8c6", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e6/de/d6bb69a7a042212fa8fec4077593", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fc/d7/66e38e026edcd53ab470c74d7224", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/42/7ddd583f9c874837a4a7f902953f", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/22/4a/7771e45d6f8316d4c738d186062e", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/44/6b/09b134e2f9b8bd276ff6351b74ee", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4e/d2/43048339ea0b88895e0e6c206f20", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/78/cd/021300c2cacc307bdda1763d9845", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f4/b2/9d68ec3b7c0981efed766e0dfdd7", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1a/f2/4bbf3362f5735492e1bb27606013", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e6/df/d9e68d3b7b1593a3400b1d2b14c7", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/e0/58c6709938ed40089213be8c7e37", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/29/d9/2c1234aaccc1c0d50962d7d61f9f", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5d/ae/45084efc0b90744bcfed29112223", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/92/0bd650555ce0042a9c56c4a0751f", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/be/8b/c9423cd7566404e2e74d0db50506", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/15/c8ce7acd9c5a973d6886771c099e", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fa/59/26dc8860ecd9644b725e9428a312", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/91/39/6ff63efde3ae2c98474712f78b56", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/18/f6/bdf379aadd643ac3ae46094d8545", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/91/c3/9fe6f6916de5e8086f3e1c9c0c1f", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/41/c0/730d363fbccc0639ac24f7318d32", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/18/82/af34d2eececb1b43018d3016f54c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/86/2f/a7abcfde5205ba2fdbf844decffb", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a7/ab/854144e721101e2eb404ff0a6d51", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f4/92/e786733e776c2b63e9f5340f88d8", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5e/48/354e3b63adf1b81a40c1d2f1e0fb", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/21/6d/f6433bcd3a4682ad5f44a724cedd", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3a/1a/ea630876f62f4b3b7b799d6323b1", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/08/8c/87e7f56a0f66064a53f70e0bd3f6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e1/2c/f5fb11983aca2855e9ee0ba2e5dd", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/d5/e793e83bf0fb26817091c22aef16", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1f/ac/b215701ff340222dab77f303d5fd", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f0/5c/78bea7e51781d6f2888867ca5be5", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/29/75/718ad217e3948a7418a6366e91c3", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/46/5a/2c1f20eb101ae08785038ad397d4", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/b2/ef20d61be8192fc906c8cc665022", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f8/35/8f46daa43dc357b438cdafaa44c0", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/72/73/84586a76cda423aa020e2bf4d1b9", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/53/87a14be9f865901c76cb468bd23c", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/57/57/a93d124c30dc513731e995a2fc35", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/73/b2/815428ea403f7c172adaa7c1880d", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/df/ae/1c8f9e6e5ac182528b59764ba2ec", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7d/4c/de308ea636089d4081fec336204e", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e1/bc/57f69a5e827136993fe632406d37", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e4/68/39916efa4879fa3d93d2704402af", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/58/6b/fac212417bcb5851ef75783ccc9b", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5c/18/04a0ef7d2da19b204f6beaf12671", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/04/8c/a80aa418ddb5db66e32eac4bcfe8", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b6/1d/c6edb81afdaff56c91b9e58f5d86", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/72/01/565daf2d42a3d7d8f53ceeca6b30", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f0/c6/d7f01e55288c9f735cd16982d346", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/08/1af07293e2c2f711e208e220589f", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4d/da/9f84cdbf6893019e9f312159a135", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/8b/1c8bef2677c8019fc47d6295b950", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d6/94/b5808b657d70a533904b83372033", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/50/de/e8a479118f1f0a85cf076947385c", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4c/a5/223faacd74a7df21ce588bd877e0", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c1/7b/36a20200b32e40d5c7789774cae3", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/f1/658e04e51212830d1d0bc4dfcf98", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5b/ab/4441a951acf01a5e0ecb3456b08c", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/37/0b/58ca3c4f357e5af96d5c0670f473", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/36/384cd7c45db39ae18bfcd089d728", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/71/a7/28df114b036f4a9a4de1ad1e57e5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/42/65/fc84a4d62423352de7c232bc25c0", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/51/1e/cc38e33b8e84805463880c484966", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6f/a5/deb805afc5f741dfb3891798bbd8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/3a/61/22ef83f4154ba1b438f07108f1c9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ee/98/2cf472347862d7fde2562b512a2a", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/fa/34/04770e9cf2bf915ab6b4679f6419", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/tools/efro/message/_sender.py b/tools/efro/message/_sender.py index 7a105d80..bd9e94db 100644 --- a/tools/efro/message/_sender.py +++ b/tools/efro/message/_sender.py @@ -118,10 +118,10 @@ class MessageSender: def send(self, bound_obj: Any, message: Message) -> Response | None: """Send a message synchronously.""" - return self.send_split_part_2( + return self.unpack_raw_response( bound_obj=bound_obj, message=message, - raw_response=self.send_split_part_1( + raw_response=self.fetch_raw_response( bound_obj=bound_obj, message=message, ), @@ -131,16 +131,16 @@ class MessageSender: self, bound_obj: Any, message: Message ) -> Response | None: """Send a message asynchronously.""" - return self.send_split_part_2( + return self.unpack_raw_response( bound_obj=bound_obj, message=message, - raw_response=await self.send_split_part_1_async( + raw_response=await self.fetch_raw_response_async( bound_obj=bound_obj, message=message, ), ) - def send_split_part_1( + def fetch_raw_response( self, bound_obj: Any, message: Message ) -> Response | SysResponse: """Send a message synchronously. @@ -171,14 +171,17 @@ class MessageSender: ) return self._decode_raw_response(bound_obj, message, response_encoded) - async def send_split_part_1_async( + async def fetch_raw_response_async( self, bound_obj: Any, message: Message ) -> Response | SysResponse: - """Send a message asynchronously. + """Fetch a raw message response. - Generally you can just call send(); these split versions are - for when message sending and response handling need to happen - in different contexts/threads. + The result of this should be passed to unpack_raw_response() to + produce the final message result. + + Generally you can just call send(); calling fetch and unpack + manually is for when message sending and response handling need + to happen in different contexts/threads. """ if self._send_async_raw_message_call is None: @@ -203,17 +206,17 @@ class MessageSender: ) return self._decode_raw_response(bound_obj, message, response_encoded) - def send_split_part_2( + def unpack_raw_response( self, bound_obj: Any, message: Message, raw_response: Response | SysResponse, ) -> Response | None: - """Complete message sending (both sync and async). + """Convert a raw fetched response into a final response/error/etc. - Generally you can just call send(); these split versions are - for when message sending and response handling need to happen - in different contexts/threads. + Generally you can just call send(); calling fetch and unpack + manually is for when message sending and response handling need + to happen in different contexts/threads. """ response = self._unpack_raw_response(bound_obj, raw_response) assert ( @@ -353,19 +356,19 @@ class BoundMessageSender: bound_obj=self._obj, message=message ) - async def send_split_part_1_async_untyped( + async def fetch_raw_response_async_untyped( self, message: Message ) -> Response | SysResponse: """Split send (part 1 of 2).""" assert self._obj is not None - return await self._sender.send_split_part_1_async( + return await self._sender.fetch_raw_response_async( bound_obj=self._obj, message=message ) - def send_split_part_2_untyped( + def unpack_raw_response_untyped( self, message: Message, raw_response: Response | SysResponse ) -> Response | None: """Split send (part 2 of 2).""" - return self._sender.send_split_part_2( + return self._sender.unpack_raw_response( bound_obj=self._obj, message=message, raw_response=raw_response )