http-longpoll

Crates.iohttp-longpoll
lib.rshttp-longpoll
version0.1.0-rc.2
created_at2025-08-08 21:27:36.328284+00
updated_at2025-09-03 10:10:19.49701+00
descriptionIdiomatic stream + sink interface for http longpoll
homepage
repositoryhttps://github.com/ash30/http-longpoll
max_upload_size
id1787352
size46,599
Ashley Arthur (ash30)

documentation

README

HTTP Longpoll

HTTP Long Polling implementation with a simple idiomatic stream/sink API, making long polling as convenient as working with WebSockets.

Features

  • Async Stream + Sink API
  • Message batching and idle poll request timeouts
  • Transparent integration with popular web frameworks

Basic Example

use http_longpoll::{Session, Config};

let (handle, session) = Session::connect(Config::Default());

// simple echo
tokio::spawn(async move {
    let (mut tx, rx) = session.split();
    while let Some(message) = rx.next().await {
        println!("Received: {:?}", message);
        tx.send(message).await;
    }
});

Status

This project is under active development. While the core functionality is implemented, API changes may occur.

Commit count: 79

cargo fmt