pub struct BootstrapUdpClient<W> { /* private fields */ }Expand description
A Bootstrap that makes it easy to bootstrap a pipeline to use for UDP clients.
Implementations§
Source§impl<W: 'static> BootstrapUdpClient<W>
impl<W: 'static> BootstrapUdpClient<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 BootstrapUdpClient::bind.
Sourcepub async fn bind<A: ToSocketAddrs>(
&mut self,
addr: A,
) -> Result<SocketAddr, Error>
pub async fn bind<A: ToSocketAddrs>( &mut self, addr: A, ) -> Result<SocketAddr, Error>
Binds local address and port
Sourcepub async fn connect(
&mut self,
addr: SocketAddr,
) -> Result<Rc<dyn OutboundPipeline<W>>, Error>
pub async fn connect( &mut self, addr: SocketAddr, ) -> Result<Rc<dyn OutboundPipeline<W>>, Error>
Connects to the remote peer
Sourcepub async fn wait_for_stop(&self)
pub async fn wait_for_stop(&self)
Waits for stop of the client
Sourcepub async fn graceful_stop(&self)
pub async fn graceful_stop(&self)
Gracefully stop the client
Trait Implementations§
Auto Trait Implementations§
impl<W> !Freeze for BootstrapUdpClient<W>
impl<W> !RefUnwindSafe for BootstrapUdpClient<W>
impl<W> !Send for BootstrapUdpClient<W>
impl<W> !Sync for BootstrapUdpClient<W>
impl<W> Unpin for BootstrapUdpClient<W>
impl<W> !UnwindSafe for BootstrapUdpClient<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