pub fn take_one_message(&self) -> Result<Option<NetworkMsg<B>>, ()> {
		self.task_notify.register();
		match self.receiver.try_recv() {
			Ok(msg) => Ok(Some(msg)),
			Err(TryRecvError::Empty) => Ok(None),
			Err(TryRecvError::Disconnected) => Err(()),
		}
	}
/// Receive a message, if any is currently-enqueued.
/// Register the current tokio task for notification when a new message is available.
Receive a message, if any is currently-enqueued.
Register the current tokio task for notification when a new message is available.
Receive a message if any is currently - enqueued . Register the current tokio task for notification when a new message is available .
pub fn take_one_message(&self) -> Result<Option<NetworkMsg<B>>, ()> {
		self.task_notify.register();
		match self.receiver.try_recv() {
			Ok(msg) => Ok(Some(msg)),
			Err(TryRecvError::Empty) => Ok(None),
			Err(TryRecvError::Disconnected) => Err(()),
		}
	}
pub fn take_one_message ( & self ) -> Result < Option < NetworkMsg < B > > , ( ) > { self . task_notify . register ( ) ; match self . receiver . try_recv ( ) { Ok ( msg ) => Ok ( Some ( msg ) ) , Err ( TryRecvError :: Empty ) => Ok ( None ) , Err ( TryRecvError :: Disconnected ) => Err ( ( ) ) , } }
Receive a message, if any is currently-enqueued.
Receive a message if any is currently - enqueued .
&self
&self