mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 05:16:24 -05:00
udp/client: Replace deprecated from_string() call with make_address_v4()
Future-proofs code if boost is ever updated.
This commit is contained in:
parent
881408445a
commit
9bb6ab77f4
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,6 @@
|
||||||
#include "input_common/udp/client.h"
|
#include "input_common/udp/client.h"
|
||||||
#include "input_common/udp/protocol.h"
|
#include "input_common/udp/protocol.h"
|
||||||
|
|
||||||
using boost::asio::ip::address_v4;
|
|
||||||
using boost::asio::ip::udp;
|
using boost::asio::ip::udp;
|
||||||
|
|
||||||
namespace InputCommon::CemuhookUDP {
|
namespace InputCommon::CemuhookUDP {
|
||||||
|
@ -33,7 +32,8 @@ public:
|
||||||
SocketCallback callback)
|
SocketCallback callback)
|
||||||
: callback(std::move(callback)), timer(io_service),
|
: callback(std::move(callback)), timer(io_service),
|
||||||
socket(io_service, udp::endpoint(udp::v4(), 0)), client_id(client_id),
|
socket(io_service, udp::endpoint(udp::v4(), 0)), client_id(client_id),
|
||||||
pad_index(pad_index), send_endpoint(udp::endpoint(address_v4::from_string(host), port)) {}
|
pad_index(pad_index),
|
||||||
|
send_endpoint(udp::endpoint(boost::asio::ip::make_address_v4(host), port)) {}
|
||||||
|
|
||||||
void Stop() {
|
void Stop() {
|
||||||
io_service.stop();
|
io_service.stop();
|
||||||
|
|
Loading…
Reference in a new issue