feat: Sse server auto ping (#74)
1. auto ping in sse stream every second to make cursor happy 2. configurable sse keep alive --------- Co-authored-by: = <=>
This commit is contained in:
parent
588a013090
commit
923e87af4d
1 changed files with 22 additions and 10 deletions
|
|
@ -24,6 +24,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
sse_path: "/sse".to_string(),
|
||||
post_path: "/message".to_string(),
|
||||
ct: tokio_util::sync::CancellationToken::new(),
|
||||
sse_keep_alive: None,
|
||||
};
|
||||
|
||||
let (sse_server, router) = SseServer::new(config);
|
||||
|
|
|
|||
Loading…
Reference in a new issue