I have seen the question similar question below:
struct sockaddr_un v/s sockaddr - C(Linux)
But I am still very unclear about what the difference is between sockaddr_in and sockaddr, every socket method/function I.e bind, connect, seems to use sockaddr and not sockaddr_in, are these structures interchangeable? if only sockaddr is used then why is there the _in one? I prefer the _in seems more detailed and sorted.
Delete the post or so if I have broken any rules ;(
most of the time the 3rd parameter is the addr_len is this used to quickly differentiate between ipv4 and ipv6?