c++ - recv() How to turn bytes back into message?
<p>So my code stores the resultant of recv() into an int var</p>

<pre><code>int iResult;
char recvbuf[DEFAULT_BUFLEN];
int recvbuflen = DEFAULT_BUFLEN;

iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
</code></pre>

<p>Which I send it</p>

<pre><code>char *sendbuf = "this is a test That is longer then what it was";
char recvbuf[DEFAULT_BUFLEN];

iResult = send(ConnectSocket, sendbuf, (int) strlen(sendbuf), 0);
</code></pre>

<p>So how do I make the bytes received back int a char string on the server side?</p>