Guest User

Untitled

a guest
Jul 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. void * tcp (void * arg){
  2. struct * info = arg;
  3. // set up socket fd
  4. while(True){
  5. int val = recvData(info, fd);
  6. }
  7. }
  8.  
  9. void * icmp (void * arg){
  10. struct * info = arg;
  11. // set up socket fd
  12. while(True){
  13. int val = receiveData(info, fd);
  14. }
  15. }
  16.  
  17. //function that is called by thread 1 and thread 2 concurrently
  18. void receiveData(struct * info, int fd){
  19. int val = recv(fd, buf, 1000, 0);
  20. }
Add Comment
Please, Sign In to add comment