lundi 29 août 2016

How to compare socket address in C?

I mean, which fields of struct sockaddr should I compare when I check whether two struct sockaddr's have the same ip address and port number? And what about sockaddr_in?

Can I just cast sockaddr_in to sockaddr, and compare it to a real sockaddr?

Aucun commentaire:

Enregistrer un commentaire