Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jsonrpc-server-utils = { version = "15.0", 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"}
2 changes: 1 addition & 1 deletion ws/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions ws/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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);
Expand Down