backpressure changes
This commit is contained in:
@@ -35,7 +35,7 @@ impl TcpConnection {
|
|||||||
let stream_id = muxer.next_id();
|
let stream_id = muxer.next_id();
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let (v_tx, mut v_rx) = mpsc::channel(1024);
|
let (v_tx, mut v_rx) = mpsc::channel(64);
|
||||||
muxer.register_stream(stream_id, v_tx).await;
|
muxer.register_stream(stream_id, v_tx).await;
|
||||||
|
|
||||||
let connect_payload = target_addr.to_string();
|
let connect_payload = target_addr.to_string();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ pub struct UdpConnection {
|
|||||||
|
|
||||||
const UDP_TIMEOUT: Duration = Duration::from_secs(60);
|
const UDP_TIMEOUT: Duration = Duration::from_secs(60);
|
||||||
|
|
||||||
const CHANNEL_CAPACITY: usize = 1024;
|
const CHANNEL_CAPACITY: usize = 64;
|
||||||
|
|
||||||
impl UdpConnection {
|
impl UdpConnection {
|
||||||
pub fn new(handle: SocketHandle, target_addr: TargetAddress, muxer: Muxer) -> Self {
|
pub fn new(handle: SocketHandle, target_addr: TargetAddress, muxer: Muxer) -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user