Struct fire_stream::server::Connection
source · pub struct Connection<P> { /* private fields */ }Implementations§
source§impl<P> Connection<P>
impl<P> Connection<P>
sourcepub fn new<S>(byte_stream: S, cfg: Config) -> Selfwhere
S: ByteStream,
P: Packet<PlainBytes> + Send + 'static,
P::Header: Send,
pub fn new<S>(byte_stream: S, cfg: Config) -> Selfwhere S: ByteStream, P: Packet<PlainBytes> + Send + 'static, P::Header: Send,
Creates a new server connection without any encryption.
pub fn new_encrypted<S>(byte_stream: S, cfg: Config, sign: Keypair) -> Selfwhere S: ByteStream, P: Packet<EncryptedBytes> + Send + 'static, P::Header: Send,
pub fn update_config(&self, cfg: Config)
pub fn configurator(&self) -> Configurator<Config>
pub async fn receive(&mut self) -> Option<Message<P>>
pub async fn close(self) -> Result<(), TaskError>
pub async fn wait(self) -> Result<(), TaskError>
Auto Trait Implementations§
impl<P> !RefUnwindSafe for Connection<P>
impl<P> Send for Connection<P>where P: Send,
impl<P> Sync for Connection<P>where P: Send,
impl<P> Unpin for Connection<P>
impl<P> !UnwindSafe for Connection<P>
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