title: How to send an integer through a socket?
body: <p>I am trying to send an integer through a socket. I am using this code to do so; however, my C code will not compile. The compiler complains that myInt has not been declared. </p>
  
  <pre><code>int tmp = htonl(myInt);
  write(socket, &amp;tmp, sizeof(tmp));
  </code></pre>
  
  <p>How do I declare myInt? Thanks.</p>