Passing int via winsocks send
<p>How could it be possible to send int (not using third party libraries) via windows sockets Send: 
it requires (const char *) as parameter. </p>

<p>My attempt was to send int like this:</p>

<pre><code>unsigned char * serialize_int(unsigned char *buffer, int value)
{
  /* Write big-endian int value into buffer; assumes 32-bit int and 8-bit char. */
  buffer[0] = value &gt;&gt; 24;
  buffer[1] = value &gt;&gt; 16;
  buffer[2] = value &gt;&gt; 8;
  buffer[3] = value;
  return buffer + 4;
}
</code></pre>

<p>but Send() wants (const char *). I'm stuck...</p>
