modified for IPv6 supported CUDPSocket

This commit is contained in:
SASANO Takayoshi
2020-03-28 05:40:35 +09:00
parent 5dccd5c5ce
commit c92039d83b
17 changed files with 105 additions and 132 deletions

View File

@@ -67,9 +67,11 @@ int CRemoteCommand::send(const std::string& command)
if (!ret)
return 1;
in_addr address = CUDPSocket::lookup("localhost");
sockaddr_storage address;
unsigned int addrlen;
CUDPSocket::lookup("localhost", m_port, address, addrlen);
ret = socket.write((unsigned char*)command.c_str(), command.length(), address, m_port);
ret = socket.write((unsigned char*)command.c_str(), command.length(), address, addrlen);
if (!ret) {
socket.close();
return 1;