Cleanup windows udp client

This commit is contained in:
gabime
2021-09-05 16:18:14 +03:00
parent 1ec50cdcfc
commit 9bb66c00e9
2 changed files with 26 additions and 61 deletions

View File

@@ -41,10 +41,8 @@ public:
// host can be hostname or ip address
explicit udp_sink(udp_sink_config sink_config)
: config_{std::move(sink_config)}
{
client_.init(config_.server_host, config_.server_port);
}
: client_{sink_config.server_host, sink_config.server_port}
{}
~udp_sink() override = default;
@@ -56,8 +54,7 @@ protected:
client_.send(formatted.data(), formatted.size());
}
void flush_() override {}
udp_sink_config config_;
void flush_() override {}
details::udp_client client_;
};