tauri-plugin-sse 0.1.0

A simple Tauri plugin for Server-Sent Events (SSE), enabling real-time, one-way updates from server to your Tauri frontend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use tauri::{AppHandle, command, Runtime};

use crate::models::*;
use crate::Result;
use crate::SseExt;

#[command]
pub(crate) async fn ping<R: Runtime>(
    app: AppHandle<R>,
    payload: PingRequest,
) -> Result<PingResponse> {
    app.sse().ping(payload)
}