mirror of
https://github.com/Kiritow/GSock.git
synced 2024-03-22 13:10:51 +08:00
Fix bug in udp functions
This commit is contained in:
parent
23dbae63e4
commit
8c449dc774
|
@ -600,7 +600,7 @@ static int convert_ipv46(const std::string& IPStr, int Port,
|
||||||
paddr6->sin6_port = htons(Port);
|
paddr6->sin6_port = htons(Port);
|
||||||
paddr6->sin6_family = AF_INET6;
|
paddr6->sin6_family = AF_INET6;
|
||||||
|
|
||||||
_out_psockaddr = (sockaddr*)&paddr6;
|
_out_psockaddr = (sockaddr*)paddr6;
|
||||||
_out_szsockaddr = sizeof(sockaddr_in6);
|
_out_szsockaddr = sizeof(sockaddr_in6);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -615,7 +615,7 @@ static int convert_ipv46(const std::string& IPStr, int Port,
|
||||||
paddr->sin_port = htons(Port);
|
paddr->sin_port = htons(Port);
|
||||||
paddr->sin_family = AF_INET;
|
paddr->sin_family = AF_INET;
|
||||||
|
|
||||||
_out_psockaddr = (sockaddr*)&paddr;
|
_out_psockaddr = (sockaddr*)paddr;
|
||||||
_out_szsockaddr = sizeof(sockaddr_in);
|
_out_szsockaddr = sizeof(sockaddr_in);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user