[package] name = "tcp-handler" version = "1.0.1" authors = ["xuxiaocheng <2762267080@qq.com>"] edition = "2021" description = "Conveniently transfer data in chunk through tokio TCP stream." readme = "README.md" license = "MIT OR Apache-2.0" repository = "https://github.com/xuxiaocheng0201/tcp-handler/" documentation = "https://docs.rs/tcp-handler/" categories = ["network-programming"] keywords = ["tcp", "tokio", "bytes", "io", "network"] [dependencies] thiserror = "^1" once_cell = "^1" tokio = { version = "^1", features = ["rt-multi-thread"] } bytes = "^1" variable-len-reader = { version = "^3.2", default-features = false, features = ["std", "tokio-comp", "bytes", "async_raw", "async_bools", "async_varint_size", "async_string"] } flate2 = { version = "^1", optional = true } rand = { version = "~0.8", optional = true } __aead_with_feature = { package = "aead", version = "0", optional = true, default-features = false, features = ["bytes"] } rsa = { version = "~0.9", optional = true, default-features = false, features = ["std", "sha2"] } aes-gcm = { version = "~0.10", optional = true, default-features = false, features = ["std", "aes", "rand_core"] } async-trait = { version = "~0.1", optional = true } serde = { version = "^1", optional = true, features = ["derive"] } [profile.dev.package.num-bigint-dig] opt-level = 3 # Speed up rsa key gen. [features] default = ["compress_encryption", "auto_flush", "stream_net"] __internal_variable_len_reader_with_feature = ["variable-len-reader/sync", "variable-len-reader/std-comp"] compression = ["dep:flate2", "__internal_variable_len_reader_with_feature"] encryption = ["dep:rand", "dep:__aead_with_feature", "dep:rsa", "dep:aes-gcm", "__internal_variable_len_reader_with_feature"] compress_encryption = ["compression", "encryption", "__internal_variable_len_reader_with_feature"] auto_flush = ["tokio/io-util"] streams = ["dep:async-trait"] stream_net = ["streams", "tokio/net"] serde = ["dep:serde"] [build-dependencies] reportme = ">=0.2" [dev-dependencies] anyhow = "^1" tokio = { version = "^1", features = ["macros", "io-util", "net"] } variable-len-reader = { version = "^3", features = ["full"] } serde_json = "^1" criterion = { version = "~0.5", features = ["async_tokio"] } [[bench]] name = "protocols" harness = false [badges] maintenance = { status = "passively-maintained" } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]