Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void * tcp (void * arg){
- struct * info = arg;
- // set up socket fd
- while(True){
- int val = recvData(info, fd);
- }
- }
- void * icmp (void * arg){
- struct * info = arg;
- // set up socket fd
- while(True){
- int val = receiveData(info, fd);
- }
- }
- //function that is called by thread 1 and thread 2 concurrently
- void receiveData(struct * info, int fd){
- int val = recv(fd, buf, 1000, 0);
- }
Add Comment
Please, Sign In to add comment