pub struct ProtosocketServerConfig { /* private fields */ }Implementations§
Source§impl ProtosocketServerConfig
impl ProtosocketServerConfig
Sourcepub fn max_buffer_length(self, max_buffer_length: usize) -> Self
pub fn max_buffer_length(self, max_buffer_length: usize) -> Self
The maximum buffer length per connection on this server.
Sourcepub fn max_queued_outbound_messages(
self,
max_queued_outbound_messages: usize,
) -> Self
pub fn max_queued_outbound_messages( self, max_queued_outbound_messages: usize, ) -> Self
The maximum number of queued outbound messages per connection on this server.
Sourcepub fn buffer_allocation_increment(
self,
buffer_allocation_increment: usize,
) -> Self
pub fn buffer_allocation_increment( self, buffer_allocation_increment: usize, ) -> Self
The step size for allocating additional memory for connection buffers on this server.
Sourcepub fn socket_config(self, config: ProtosocketSocketConfig) -> Self
pub fn socket_config(self, config: ProtosocketSocketConfig) -> Self
The tcp socket configuration options for this server.
Sourcepub async fn bind_tcp<Connector: ServerConnector>(
self,
address: SocketAddr,
connector: Connector,
runtime: Handle,
) -> Result<ProtosocketServer<Connector>>
pub async fn bind_tcp<Connector: ServerConnector>( self, address: SocketAddr, connector: Connector, runtime: Handle, ) -> Result<ProtosocketServer<Connector>>
Binds a tcp listener to the given address and returns a ProtosocketServer with this configuration. After binding, you must await the returned server future to process requests.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProtosocketServerConfig
impl RefUnwindSafe for ProtosocketServerConfig
impl Send for ProtosocketServerConfig
impl Sync for ProtosocketServerConfig
impl Unpin for ProtosocketServerConfig
impl UnwindSafe for ProtosocketServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more