i understand the basic sock functions and how to use them, like socket(), bind(), listen(), connect(), accept(), send(), & recv(). i'm having some trouble figuring out how to use sockets though. i'm not really understanding what the structs sockaddr_in and sockaddr do. i know that they store the address and the port, but i don't really know what else and for what.
can anyone tell me what sockaddr_in and sockaddr are for, what they do, and what the difference between them is? thank you for your time.