global buf size mtu based config and protocol rename
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::net::CHANNEL_CAPACITY;
|
||||
use bytes::{Buf, Bytes, BytesMut};
|
||||
use netrunner_core::net::network::NetworkConfig;
|
||||
use smoltcp::{
|
||||
iface::SocketHandle,
|
||||
socket::{tcp, udp},
|
||||
@@ -28,8 +28,10 @@ pub struct ConnectionCore {
|
||||
impl ConnectionCore {
|
||||
pub fn new(handle: SocketHandle) -> (Self, mpsc::Receiver<Bytes>, mpsc::Sender<Bytes>) {
|
||||
trace!(%handle, "Creating ConnectionCore channels");
|
||||
let (tx_to_net, rx_from_smol) = mpsc::channel::<Bytes>(CHANNEL_CAPACITY);
|
||||
let (tx_to_smol, rx_from_net) = mpsc::channel::<Bytes>(CHANNEL_CAPACITY);
|
||||
let (tx_to_net, rx_from_smol) =
|
||||
mpsc::channel::<Bytes>(NetworkConfig::global().channel_capacity);
|
||||
let (tx_to_smol, rx_from_net) =
|
||||
mpsc::channel::<Bytes>(NetworkConfig::global().channel_capacity);
|
||||
|
||||
let core = Self {
|
||||
handle,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use bytes::Bytes;
|
||||
use netrunner_core::protocol::codec::socks::TargetAddress;
|
||||
use netrunner_core::nrxp::codec::socks::TargetAddress;
|
||||
use netrunner_logger::{debug, error, info, trace, warn};
|
||||
use smoltcp::{
|
||||
iface::{SocketHandle, SocketSet},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use netrunner_core::proxy::connection::connection::ClientHandler;
|
||||
use netrunner_core::proxy::connection::muxer::Muxer;
|
||||
use netrunner_core::net::connection::connection::ClientHandler;
|
||||
use netrunner_core::net::connection::muxer::Muxer;
|
||||
use smoltcp::iface::PollResult;
|
||||
use smoltcp::time::Instant;
|
||||
use smoltcp::wire::{IpAddress, IpCidr};
|
||||
|
||||
@@ -3,5 +3,3 @@ pub mod connection_manager;
|
||||
pub mod dns;
|
||||
pub mod engine;
|
||||
pub mod ip_store;
|
||||
|
||||
pub const CHANNEL_CAPACITY: usize = 16;
|
||||
|
||||
Reference in New Issue
Block a user