pub struct SseServerConfig {
pub bind: SocketAddr,
pub sse_path: String,
pub post_path: String,
pub ct: CancellationToken,
pub sse_keep_alive: Option<Duration>,
}
Expand description
Configuration for the SSE server transport.
Allows customization of bind address, endpoints, keep-alive intervals, and cancellation.
§Example
use rmcp_actix_web::SseServerConfig;
use tokio_util::sync::CancellationToken;
let config = SseServerConfig {
bind: "127.0.0.1:8080".parse().unwrap(),
sse_path: "/sse".to_string(),
post_path: "/message".to_string(),
ct: CancellationToken::new(),
sse_keep_alive: Some(std::time::Duration::from_secs(30)),
};
Fields§
§bind: SocketAddr
§sse_path: String
§post_path: String
§ct: CancellationToken
§sse_keep_alive: Option<Duration>
Trait Implementations§
Source§impl Clone for SseServerConfig
impl Clone for SseServerConfig
Source§fn clone(&self) -> SseServerConfig
fn clone(&self) -> SseServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SseServerConfig
impl RefUnwindSafe for SseServerConfig
impl Send for SseServerConfig
impl Sync for SseServerConfig
impl Unpin for SseServerConfig
impl UnwindSafe for SseServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more