串口改协程前
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
#include "Local_Server/Data_Feed/Data_Feed.h"
|
||||
#include "../server/Global.h"
|
||||
void Data_Feed_UDP_Server::handle_in_loop() {
|
||||
ucoro::sync_await(svr.tick_coro());
|
||||
ucoro::sync_await(handle_in_loop_coro());
|
||||
}
|
||||
|
||||
ucoro::awaitable<void> Data_Feed_UDP_Server::handle_in_loop_coro() {
|
||||
co_await svr.tick_coro();
|
||||
co_return;
|
||||
}
|
||||
|
||||
ucoro::awaitable<void> Data_Feed_UDP_Server::send_coro(const std::string& data) {
|
||||
co_await svr.write_to_all_clients_coro(data);
|
||||
co_return;
|
||||
}
|
||||
bool Data_Feed_UDP_Server::_open() {
|
||||
svr.set_bind_address("0.0.0.0", port);
|
||||
|
||||
Reference in New Issue
Block a user