title: Sending a structure from client to server in TCP/IP socket
body: <p>I have the following structure in my header file <code>structure.h</code>. Now i need to use this structure in my <code>main.c</code> file.</p>
  
  <p>I need to fill this structure with some values and I need to send this from TCP/IP client to the TCP/IP server on the same system.</p>
  
  <pre><code>#ifndef STRUCTURE_H
  #define STRUCTURE_H
  
  typedef struct
  {
      unsigned int variable3;
      char variable4[8];
  }NUMBER_ONE,*PNUMBER_ONE;
  
  
  typedef struct
  {
      unsigned int variable5;
      char variable6[8];
  }NUMBER_TWO,*PNUMBER_TWO;
  
  typedef struct
  {
      char name[32];
      unsigned int a;
      unsigned int b;
      NUMBER_ONE variable1;
      NUMBER_TWO variable2;
  }NUMBER_THREE,*PNUMBER_THREE;
  
  #endif
  </code></pre>
  
  <p>I have tried this but, I am not good in C, so please can anyone tell me how to do it, by taking the above structure as an example? Till socket connection establishment is ok for me,
  but after establishing connection, how do I send this structure from the client to the server?</p>
  
  <p>I am doing this in my Linux Ubuntu 12.04 system.</p>