Skip to content

Commit 099848e

Browse files
committed
remove transport and merge it to util
1 parent 332a0da commit 099848e

File tree

18 files changed

+15
-36
lines changed

18 files changed

+15
-36
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ members = [
1010
"stun",
1111
"turn",
1212
"util",
13-
"transport",
1413
]
1514

1615
[profile.dev]

dtls/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ edition = "2018"
88

99
[dependencies]
1010
util = { path = "../util" }
11-
transport = {path = "../transport"}
1211
byteorder = "1.3.2"
1312
lazy_static = "1.3.0"
1413
rand_core = "0.5.1"

dtls/src/conn.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ use crate::record_layer::*;
2424
use crate::signature_hash_algorithm::parse_signature_schemes;
2525
use crate::state::*;
2626

27-
use transport::replay_detector::*;
28-
2927
use std::collections::HashMap;
3028
use std::io::{BufReader, BufWriter};
3129
use std::sync::atomic::{AtomicBool, AtomicU16, AtomicU64, Ordering};
@@ -38,6 +36,7 @@ use tokio::sync::{mpsc, Mutex};
3836
use tokio::time;
3937
use tokio::time::{timeout, Duration};
4038

39+
use util::replay_detector::*;
4140
use util::Error;
4241

4342
pub(crate) const INITIAL_TICKER_INTERVAL: time::Duration = time::Duration::from_secs(1);

srtp/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ edition = "2018"
88

99
[dependencies]
1010
util = { path = "../util" }
11-
transport = {path = "../transport"}
1211
rtp = { path = "../rtp" }
1312
rtcp = { path = "../rtcp" }
1413
byteorder = "1.3.2"

srtp/src/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::HashMap;
22

3-
use transport::replay_detector::*;
3+
use util::replay_detector::*;
44
use util::Error;
55

66
use super::protection_profile::*;

srtp/src/option.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use super::context::srtcp::*;
22
use super::context::*;
3-
use transport::replay_detector::*;
3+
4+
use util::replay_detector::*;
45

56
pub type ContextOption = Box<dyn Fn() -> Box<dyn ReplayDetector + Send>>;
67

srtp/src/session/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ mod session_rtp_test;
33

44
use crate::{config::Config, context::Context, option, stream::Stream};
55

6-
use transport::{buffer::ERR_BUFFER_FULL, Buffer};
76
use util::Error;
7+
use util::{buffer::ERR_BUFFER_FULL, Buffer};
88

99
use tokio::{
1010
net::UdpSocket,

srtp/src/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use transport::Buffer;
1+
use util::Buffer;
22
use util::Error;
33

44
use tokio::sync::mpsc;

transport/Cargo.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

transport/src/lib.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

util/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ rsa = "0.3.0"
1717
signature = "1.2.2"
1818
x509-parser = "0.8.2"
1919
der-parser = "4.1.0"
20+
lazy_static = "1.3.0"
2021

2122
[dev-dependencies]
2223
tokio-test = "0.3"

transport/src/buffer.rs renamed to util/src/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use util::error::Error;
1+
use crate::error::Error;
22

33
use std::sync::Arc;
44

File renamed without changes.
File renamed without changes.

util/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#![warn(rust_2018_idioms)]
22
#![allow(dead_code)]
33

4+
#[macro_use]
5+
extern crate lazy_static;
6+
7+
pub mod buffer;
48
pub mod error;
9+
pub mod fixed_big_int;
10+
pub mod replay_detector;
511

12+
pub use crate::buffer::Buffer;
613
pub use crate::error::Error;
File renamed without changes.

0 commit comments

Comments
 (0)