mirror of
https://github.com/fafhrd91/actix-net
synced 2025-02-17 14:43:31 +01:00
add SslError
This commit is contained in:
parent
d2a223e69e
commit
9bc492cf6c
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
* Add `ServerBuilder::maxconnrate` sets the maximum per-worker number of concurrent connections
|
* Add `ServerBuilder::maxconnrate` sets the maximum per-worker number of concurrent connections
|
||||||
|
|
||||||
|
* Add helper ssl error `SslError`
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ impl ServerBuilder {
|
|||||||
/// can be used to limit the global SSL CPU usage.
|
/// can be used to limit the global SSL CPU usage.
|
||||||
///
|
///
|
||||||
/// By default max connections is set to a 256.
|
/// By default max connections is set to a 256.
|
||||||
pub fn maxconnrate(mut self, num: usize) -> Self {
|
pub fn maxconnrate(self, num: usize) -> Self {
|
||||||
ssl::max_concurrent_ssl_connect(num);
|
ssl::max_concurrent_ssl_connect(num);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -33,3 +33,9 @@ pub(crate) static MAX_CONN: AtomicUsize = AtomicUsize::new(256);
|
|||||||
thread_local! {
|
thread_local! {
|
||||||
static MAX_CONN_COUNTER: Counter = Counter::new(MAX_CONN.load(Ordering::Relaxed));
|
static MAX_CONN_COUNTER: Counter = Counter::new(MAX_CONN.load(Ordering::Relaxed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Ssl error combinded with service error.
|
||||||
|
pub enum SslError<E1, E2> {
|
||||||
|
Ssl(E1),
|
||||||
|
Service(E2),
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user