|
how to send a signal to a thread
Hello all,
Iam working on an application which requires sending request over n/w to server and receiving responses from the server. I have a seperate user defined function in which i create a socket and all other stuff(bind , send to ,recvfrom), the socket i have created is a datagram , nonblocking socket i also have created a thread which will be pointing to a function which runs an infinite loop and keeps on doing the select() function on the socket to read data from the server if any received in the socket. I also have another user defined function in which i close the socket. My requirement is that when the control enters this function in which i close the socket i need to signal the function which is being pointed by the thread so that it can exit the infinite loop. I tried a google but could not find any solution. If anyone has worked on these lines or have any idea abt how this cud be done i request ur goodselves to help me in this problem
Regards,
Suresh stephen
|