C++ server and java client chat [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . ;) I write a chat program with c++ server and java client. The code of the function that responsible to receiving messages from the client is: void *recieve(void* *v) { while (true) { bzero(buffer, 256); n = read(socketfd, buffer, 256); if (n < 0) exit(1); printf("Client: %s", buffer); } } the code