Move tokio_kcp to local files
This commit is contained in:
@@ -104,12 +104,12 @@ impl Server {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::plugins::kcp::{KcpConfig, KcpStream};
|
||||
use std::net::SocketAddr;
|
||||
use std::thread::{self, sleep};
|
||||
use std::time::Duration;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
use tokio_kcp::{KcpConfig, KcpStream};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use crate::plugins::kcp::{KcpConfig, KcpListener, KcpStream};
|
||||
use crate::servers::Proxy;
|
||||
use futures::future::try_join;
|
||||
use log::{debug, error, warn};
|
||||
@@ -6,7 +7,6 @@ use std::sync::Arc;
|
||||
use tokio::io;
|
||||
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
|
||||
use tokio::net::TcpStream;
|
||||
use tokio_kcp::{KcpConfig, KcpListener, KcpStream};
|
||||
|
||||
pub async fn proxy(config: Arc<Proxy>) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let kcp_config = KcpConfig::default();
|
||||
|
||||
Reference in New Issue
Block a user