Add Read and Write for Async TunInterface
Those features are implemented using AsyncFD. While write doesn't require a mutable reference to self, read does. Make Async Tun a feature remove async tun from workspace rename write/read to send/recv
This commit is contained in:
parent
d3882bd008
commit
beae8c0f79
12 changed files with 135 additions and 64 deletions
|
|
@ -12,6 +12,14 @@ tokio = { version = "1.28", features = [] }
|
|||
byteorder = "1.4"
|
||||
log = "0.4"
|
||||
|
||||
futures = { version = "0.3.28", optional = true }
|
||||
|
||||
[features]
|
||||
tokio = ["tokio/net", "dep:futures"]
|
||||
|
||||
[target.'cfg(feature = "tokio")'.dev-dependencies]
|
||||
tokio = { features = ["rt", "macros"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
lazy_static = "1.4"
|
||||
libloading = "0.7"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue