Skip to content

Commit

Permalink
feat(router): implement socket manager
Browse files Browse the repository at this point in the history
  • Loading branch information
max-niederman committed Jan 19, 2024
1 parent 430335b commit f0a0c9a
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 24 deletions.
143 changes: 133 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/centipede_router_tun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hypertube = "0.2.2"
mio = { version = "0.8.10", features = ["os-poll"] }
socket2 = { version = "0.5.5", features = ["all"] }
thiserror = "1.0.56"
15 changes: 1 addition & 14 deletions packages/centipede_router_tun/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
mod sockets;
Loading

0 comments on commit f0a0c9a

Please sign in to comment.