mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
revert
This commit is contained in:
parent
3608c3d10a
commit
29d97125f0
1 changed files with 5 additions and 1 deletions
|
|
@ -805,7 +805,11 @@ public:
|
|||
|
||||
void sendTo(const std::string& addr, int port, const char* buffer, size_t length) override {
|
||||
logger.info() << "sendto " << addr << ":" << port;
|
||||
sockaddr_in client = resolve_address_dgram(addr, port);
|
||||
sockaddr_in client{};
|
||||
client.sin_family = AF_INET;
|
||||
inet_pton(AF_INET, addr.c_str(), &client.sin_addr);
|
||||
client.sin_port = htons(port);
|
||||
|
||||
if (sendto(descriptor, buffer, length, 0,
|
||||
reinterpret_cast<sockaddr*>(&client), sizeof(client)) < 0) {
|
||||
logger.error() << handle_socket_error("sendto").what();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue