2026-01-25 17:43:52 +08:00
|
|
|
from typing import Dict, Any, TYPE_CHECKING
|
2025-09-03 09:43:34 +08:00
|
|
|
|
2026-01-25 17:43:52 +08:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
from core.connection import ConnectionHandler
|
2025-09-03 09:43:34 +08:00
|
|
|
from core.handle.helloHandle import handleHelloMessage
|
|
|
|
|
from core.handle.textMessageHandler import TextMessageHandler
|
|
|
|
|
from core.handle.textMessageType import TextMessageType
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class HelloTextMessageHandler(TextMessageHandler):
|
|
|
|
|
"""Hello消息处理器"""
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def message_type(self) -> TextMessageType:
|
|
|
|
|
return TextMessageType.HELLO
|
|
|
|
|
|
2026-01-25 17:43:52 +08:00
|
|
|
async def handle(self, conn: "ConnectionHandler", msg_json: Dict[str, Any]) -> None:
|
|
|
|
|
await handleHelloMessage(conn, msg_json)
|