mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 07:21:51 +00:00
update
This commit is contained in:
parent
f1a05a1b43
commit
3608c3d10a
1 changed files with 6 additions and 2 deletions
|
|
@ -804,9 +804,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendTo(const std::string& addr, int port, const char* buffer, size_t length) override {
|
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 = resolve_address_dgram(addr, port);
|
||||||
sendto(descriptor, buffer, length, 0,
|
if (sendto(descriptor, buffer, length, 0,
|
||||||
reinterpret_cast<sockaddr*>(&client), sizeof(client));
|
reinterpret_cast<sockaddr*>(&client), sizeof(client)) < 0) {
|
||||||
|
logger.error() << handle_socket_error("sendto").what();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void close() override {
|
void close() override {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue