mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
modified for IPv6 supported CUDPSocket
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user