Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. while((csock = accept(ssock,NULL,NULL))>=0)
  2. {
  3. char buff[40];
  4. int len, count=0;
  5. while(count<40)
  6. {
  7. if(len=recv(csock, buff+count, sizeof(buff),0)>0);
  8. count=count+len;
  9. }
  10. send(csock,"Megkaptam\n",sizeof("Megkaptam\n"),0);
  11. send(csock,buff,sizeof(buff),0);
  12.  
  13. closesocket(csock);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement