sockets - How to I make UDP and TCP flows simultaneously without multi-thread program -
my program following
sender side:
while(1){ sendto(); // send data packets usleep(); // delay avoid overflow }
receiver side:
while(1){ recvfrom(); // receive }
i have tcp socket appeared in receiver while loop, send control message (to change time of usleep) receiver side sender side every 2 seconds( or every 100 received packets). in mean while, sender should able listen control message in while loop. can achieved without multi-thread program?
Comments
Post a Comment