views:

54

answers:

1

bool checkSockaddr(sockaddr_in a, sockaddr_in b)

check if they two have the same address information.

+2  A: 

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; }

Jerry Coffin