所以我的代码将recv()的结果存储到int var
中int iResult;
char recvbuf[DEFAULT_BUFLEN];
int recvbuflen = DEFAULT_BUFLEN;
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
我寄给你的
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);
那么如何将收到的字节作为服务器端的char字符串返回?