title: How to create and send data packets in C++
body: <p>I want to send the following data as packet to a socket using C++, all in one packet:</p>
  
  <pre><code>  fixed header:   { 0xe1,0xe2}          
     data1(int) :   {0x1e,0x25,0x71,0x80}               
     data2(int):    {0x00,0x00,0x00,0x23}        
  </code></pre>
  
  <p>What would the code typically look like to create and send the packet containing all this data with Initial value ?</p>