Rust wrapper for the ATProto tap utility
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use tcp_nodelay and increase event buffer size

dawn 982c843e 961431d1

+5 -1
+5 -1
tapped/src/channel.rs
··· 84 84 let tcp_stream = tokio::net::TcpStream::connect(addr).await 85 85 .map_err(Error::Io)?; 86 86 87 + // Enable TCP_NODELAY to ensure low latency for streaming events 88 + let _ = tcp_stream.set_nodelay(true); 89 + 87 90 let client = WebSocketClient::<Http1>::new(Config::default()); 88 91 89 92 let ws_stream = if ws_url.scheme() == "wss" { ··· 119 122 120 123 let (read, write) = ws_stream.split(); 121 124 122 - let (event_tx, event_rx) = mpsc::channel(100); 125 + // Buffer size increased to 2048 to prevent TCP window clamping during brief processing spikes 126 + let (event_tx, event_rx) = mpsc::channel(2048); 123 127 let (ack_tx, ack_rx) = mpsc::channel(1000); 124 128 125 129 let ack_tx_clone = ack_tx.clone();