Remove the RTVIServerMessage logic from the RTVIProcessor
This commit is contained in:
@@ -11,9 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Added a new frame, `ServerMessageFrame`, and RTVI message `RTVIServerMessage`
|
- Added a new frame, `ServerMessageFrame`, and RTVI message `RTVIServerMessage`
|
||||||
which provides a generic mechanism for sending custom messages from server to
|
which provides a generic mechanism for sending custom messages from server to
|
||||||
client. The `ServerMessageFrame` can be processed by either a `RTVIProcessor`
|
client. The `ServerMessageFrame` is processed by the `RTVIObserver` and will
|
||||||
or `RTVIObserver` and will be delivered to the client's `onServerMessage`
|
be delivered to the client's `onServerMessage` callback or `ServerMessage`
|
||||||
callback.
|
event.
|
||||||
|
|
||||||
## [0.0.58] - 2025-02-26
|
## [0.0.58] - 2025-02-26
|
||||||
|
|
||||||
|
|||||||
@@ -905,11 +905,6 @@ class RTVIProcessor(FrameProcessor):
|
|||||||
async def handle_message(self, message: RTVIMessage):
|
async def handle_message(self, message: RTVIMessage):
|
||||||
await self._message_queue.put(message)
|
await self._message_queue.put(message)
|
||||||
|
|
||||||
async def _handle_server_message(self, frame: ServerMessageFrame):
|
|
||||||
"""Handle server message frame by converting it to a transport message."""
|
|
||||||
message = RTVIServerMessage(data=frame.data)
|
|
||||||
await self._push_transport_message(message)
|
|
||||||
|
|
||||||
async def handle_function_call(
|
async def handle_function_call(
|
||||||
self,
|
self,
|
||||||
function_name: str,
|
function_name: str,
|
||||||
@@ -949,9 +944,6 @@ class RTVIProcessor(FrameProcessor):
|
|||||||
await self.push_frame(frame, direction)
|
await self.push_frame(frame, direction)
|
||||||
elif isinstance(frame, TransportMessageUrgentFrame):
|
elif isinstance(frame, TransportMessageUrgentFrame):
|
||||||
await self._handle_transport_message(frame)
|
await self._handle_transport_message(frame)
|
||||||
elif isinstance(frame, ServerMessageFrame):
|
|
||||||
await self._handle_server_message(frame)
|
|
||||||
await self.push_frame(frame, direction)
|
|
||||||
# All other system frames
|
# All other system frames
|
||||||
elif isinstance(frame, SystemFrame):
|
elif isinstance(frame, SystemFrame):
|
||||||
await self.push_frame(frame, direction)
|
await self.push_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user