Bounded text WebSocket sessions for moonbitlang/async
Dependencies
let limits = @session.Limits(max_pending_bytes=65536, max_pending_messages=128)
@session.with_session(ws, limits~, async fn(session) {
ignore(session.finish("goodbye"))
})pub struct Limits {
max_pending_bytes : Int
max_pending_messages : Int
write_timeout_ms : Int
heartbeat_ms : Int
close_timeout_ms : Int
}fn Limits::Limits(max_pending_bytes? : Int, max_pending_messages? : Int, write_timeout_ms? : Int, heartbeat_ms? : Int, close_timeout_ms? : Int) -> Limits raise InvalidLimitspub struct Session {
// private fields
}Install
Download zipBounded text WebSocket sessions for moonbitlang/async
Dependencies