(self)
| 62 | // http-only: Summit's RPC is request/response (no subscriptions), so |
| 63 | // websockets are not needed. jsonrpsee enables websockets with pings |
| 64 | // disabled by default, and an idle upgraded connection holds its |
| 65 | // max_connections permit until the client closes; disabling websocket |
| 66 | // upgrades removes that idle-permit-exhaustion vector entirely. |
| 67 | // The batch config caps calls per JSON-RPC batch (see `with_batch_limit`). |
| 68 | config: ServerConfigBuilder::new() |
| 69 | .http_only() |
| 70 | .set_batch_request_config(default_batch_config()), |
| 71 | cors_domains: None, |
| 72 | request_timeout: Duration::from_secs(crate::DEFAULT_RPC_REQUEST_TIMEOUT_SECS), |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | pub fn with_max_connections(mut self, max: u32) -> Self { |
| 77 | self.config = self.config.max_connections(max); |
| 78 | self |
| 79 | } |
| 80 | |
| 81 | pub fn with_max_request_body_size(mut self, max: u32) -> Self { |
| 82 | self.config = self.config.max_request_body_size(max); |
| 83 | self |
no outgoing calls