mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-24 16:06:51 +08:00
29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
# Released under the MIT License. See LICENSE for details.
|
|
#
|
|
"""Functionality for sending and responding to messages.
|
|
Supports static typing for message types and possible return types.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from efro.util import set_canonical_module
|
|
from efro.message._protocol import MessageProtocol
|
|
from efro.message._sender import (MessageSender, BoundMessageSender)
|
|
from efro.message._receiver import (MessageReceiver, BoundMessageReceiver)
|
|
from efro.message._module import (create_sender_module, create_receiver_module)
|
|
from efro.message._message import (Message, Response, EmptySysResponse,
|
|
ErrorSysResponse, StringResponse,
|
|
BoolResponse, UnregisteredMessageIDError)
|
|
|
|
__all__ = [
|
|
'Message', 'Response', 'EmptySysResponse', 'ErrorSysResponse',
|
|
'StringResponse', 'BoolResponse', 'MessageProtocol', 'MessageSender',
|
|
'BoundMessageSender', 'MessageReceiver', 'BoundMessageReceiver',
|
|
'create_sender_module', 'create_receiver_module',
|
|
'UnregisteredMessageIDError'
|
|
]
|
|
|
|
# Have these things present themselves cleanly as 'thismodule.SomeClass'
|
|
# instead of 'thismodule._internalmodule.SomeClass'
|
|
set_canonical_module(module_globals=globals(), names=__all__)
|