开发者

how to compare two endpoint address with C++ in windows:

开发者 https://www.devze.com 2023-01-18 10:00 出处:网络
bool checkSockaddr(sockaddr_in a, soc开发者_如何学JAVAkaddr_in b) check if they two have the same address information.bool checkSockaddr(sockaddr_in const &a, sockaddr_in const &b) {

bool checkSockaddr(sockaddr_in a, soc开发者_如何学JAVAkaddr_in b)

check if they two have the same address information.


bool checkSockaddr(sockaddr_in const &a, sockaddr_in const &b) { return a.sin_addr.S_un.S_addr == b.sin_addr.S_un.S_addr; }

0

精彩评论

暂无评论...
验证码 换一张
取 消