pub struct BootstrapTcpServer<W> { /* private fields */ }Expand description
A Bootstrap that makes it easy to bootstrap a pipeline to use for TCP servers.
Implementations§
Source§impl<W: 'static> BootstrapTcpServer<W>
impl<W: 'static> BootstrapTcpServer<W>
Sourcepub fn max_payload_size(&mut self, max_payload_size: usize) -> &mut Self
pub fn max_payload_size(&mut self, max_payload_size: usize) -> &mut Self
Sets max payload size, default is 2048 bytes
Sourcepub fn pipeline(
&mut self,
pipeline_factory_fn: PipelineFactoryFn<TaggedBytesMut, W>,
) -> &mut Self
pub fn pipeline( &mut self, pipeline_factory_fn: PipelineFactoryFn<TaggedBytesMut, W>, ) -> &mut Self
Creates pipeline instances from when calling BootstrapTcpServer::bind.
Sourcepub async fn bind<A: ToSocketAddrs>(&self, addr: A) -> Result<SocketAddr, Error>
pub async fn bind<A: ToSocketAddrs>(&self, addr: A) -> Result<SocketAddr, Error>
Binds local address and port
Sourcepub async fn wait_for_stop(&self)
pub async fn wait_for_stop(&self)
Waits for stop of the server
Sourcepub async fn graceful_stop(&self)
pub async fn graceful_stop(&self)
Gracefully stop the server
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for BootstrapTcpServer<W>
impl<W> !RefUnwindSafe for BootstrapTcpServer<W>
impl<W> !Send for BootstrapTcpServer<W>
impl<W> !Sync for BootstrapTcpServer<W>
impl<W> Unpin for BootstrapTcpServer<W>
impl<W> !UnwindSafe for BootstrapTcpServer<W>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more