runtimepy.message
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/message/__init__.py

A module implementing a message-stream processing interface.

 
Package Contents
       
handlers
interface
types

 
Classes
       
builtins.object
MessageProcessor

 
class MessageProcessor(builtins.object)
    MessageProcessor(byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> None
 
A class for parsing size-delimited messages.
 
  Methods defined here:
__init__(self, byte_order: runtimepy.primitives.byte_order.ByteOrder = <ByteOrder.NETWORK: 4>) -> None
Initialize this instance.
encode(self, stream: _io.BytesIO, data: bytes | str) -> None
Encode a message to a stream.
encode_json(self, stream: _io.BytesIO, data: dict[str, typing.Any]) -> None
Encode a message as JSON.
messages(self, data: bytes) -> Iterator[dict[str, Any]]
Iterate over incoming messages.
process(self, data: bytes) -> Iterator[bytes]
Process an incoming message.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__annotations__ = {'message_length_kind': type[typing.Union[runtimepy.primitives.int.Uint8...itive, runtimepy.primitives.int.Uint64Primitive]]}
message_length_kind = <class 'runtimepy.primitives.int.Uint32Primitive'>
A simple primitive class for integer primitives.

 
Data
        DEFAULT_BYTE_ORDER = <ByteOrder.NETWORK: 4>
JsonMessage = dict[str, typing.Any]
UnsignedInt = typing.Union[runtimepy.primitives.int.Uint8Primi...mitive, runtimepy.primitives.int.Uint64Primitive]