Skip to content
Merged
Changes from all 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
13 changes: 5 additions & 8 deletions protosocket-server/src/connection_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ pub trait ServerConnector: Unpin {
address: SocketAddr,
) -> <Self::Bindings as ConnectionBindings>::Reactor;

fn maximum_message_length(&self) -> usize {
4 * (2 << 20)
}

fn max_queued_outbound_messages(&self) -> usize {
256
}

fn connect(
&self,
stream: tokio::net::TcpStream,
Expand Down Expand Up @@ -95,6 +87,11 @@ impl<Connector: ServerConnector> ProtosocketServer<Connector> {
pub fn set_max_queued_outbound_messages(&mut self, max_queued_outbound_messages: usize) {
self.max_queued_outbound_messages = max_queued_outbound_messages;
}

/// Set the step size for allocating additional memory for connection buffers created by this server after the setting is applied.
pub fn set_buffer_allocation_increment(&mut self, buffer_allocation_increment: usize) {
self.buffer_allocation_increment = buffer_allocation_increment;
}
}

impl<Connector: ServerConnector> Future for ProtosocketServer<Connector> {
Expand Down
Loading