diff --git a/ws/Cargo.toml b/ws/Cargo.toml index 0c9e0e627..32f6215ef 100644 --- a/ws/Cargo.toml +++ b/ws/Cargo.toml @@ -15,7 +15,7 @@ jsonrpc-server-utils = { version = "14.2", path = "../server-utils" } log = "0.4" parking_lot = "0.10.0" slab = "0.4" -ws = "0.9" +parity-ws = "0.10" [badges] travis-ci = { repository = "paritytech/jsonrpc", branch = "master"} diff --git a/ws/src/lib.rs b/ws/src/lib.rs index aeae08a5d..5c1cfc3ca 100644 --- a/ws/src/lib.rs +++ b/ws/src/lib.rs @@ -5,7 +5,7 @@ use jsonrpc_server_utils as server_utils; pub use jsonrpc_core; -pub use ws; +pub use parity_ws as ws; #[macro_use] extern crate log; diff --git a/ws/src/server.rs b/ws/src/server.rs index 4fb83d67a..d68610710 100644 --- a/ws/src/server.rs +++ b/ws/src/server.rs @@ -64,6 +64,8 @@ impl Server { config.max_connections = max_connections; // don't accept super large requests config.max_fragment_size = max_payload_bytes; + config.max_in_buffer_capacity = max_payload_bytes; + config.max_out_buffer_capacity = max_payload_bytes; // don't grow non-final fragments (to prevent DOS) config.fragments_grow = false; config.fragments_capacity = cmp::max(1, max_payload_bytes / config.fragment_size);