LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Socket structure (https://www.linuxquestions.org/questions/programming-9/socket-structure-341418/)

exvor 07-08-2005 06:28 PM

Socket structure
 
Hello all im trying to make sence of some example code for dealing with socket programming.

here is the code
Code:

  struct sockaddr_in {
        short int          sin_family;  // Address family
        unsigned short int sin_port;    // Port number
        struct in_addr    sin_addr;    // Internet address
        unsigned char      sin_zero[8]; // Same size as struct sockaddr
    };

ok well i get that this is a basic structure. What i dont get is the struct in the structure.

is it defined out side of this structure. Sorry my nested structure is a little rusty so if the answer is obvious please dont kill me. :)

exvor 07-08-2005 07:26 PM

Never mind i answered my own question.

wow i really need to relearn structures :p


All times are GMT -5. The time now is 10:57 PM.