But the client recieves the messages restricted to the lenth of the first recieved message.
In order, the server sends, "Welcome", "-Ping", and "-RequestName".
Expand|Select|Wrap|Line Numbers
- char buf[1000];
- for(;;){
- recv(mysoc, buf, 1000, 0);
- std:: cout << "Server: "<< buf << ".\n";
- ...
- }
Server: Welcome
Server: -Pingme.
Server: -Requme.
Do I need to empty buf? if so, how?