Module MessageReceiveCommand

Module MessageReceiveCommand 

Source
Expand description

§MessageReceiveCommand

Handles receiving messages from Wind through IPC.

§RESPONSIBILITIES

§Message Reception

  • Receive JSON messages from Wind frontend
  • Parse and validate message structure
  • Delegate to TauriIPCServer for message processing
  • Return success/error response to caller

§ARCHITECTURAL ROLE

§Position in Mountain

  • IPC wrapper command in Binary subsystem
  • Bridge between frontend and IPC server

§Dependencies

  • crate::IPC::TauriIPCServer: Message processing
  • tauri: IPC framework
  • serde_json: JSON parsing

§Dependents

  • Wind frontend: Sends messages via this command
  • Tauri IPC handler: Routes messages to this command

§SECURITY

§Considerations

  • Validate JSON structure before processing
  • Malformed JSON should not crash the application
  • Messages may contain user input; proper parsing required

§PERFORMANCE

§Considerations

  • JSON parsing has some overhead but is fast for typical messages
  • Async execution doesn’t block main thread
  • Consider message batching for high-frequency updates

Functions§

MountainIPCReceiveMessage
Receive messages from Wind through IPC.