Init
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use tokio::net::UdpSocket;
|
||||
use std::error::Error;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::Arc;
|
||||
use tokio::task::AbortHandle;
|
||||
use crate::domain::event::{Event, EventBus};
|
||||
@@ -67,7 +66,7 @@ impl UdpServer {
|
||||
|
||||
pub async fn send_udp_message(&self, message: &UDPMessage) -> bool {
|
||||
match self.socket.send_to(&message.to_bytes(), message.address()).await {
|
||||
Ok(size) => {
|
||||
Ok(_size) => {
|
||||
self.event_bus.emit(Event::UdpOut(message.clone())).await;
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user