posted 25 years ago
Hi Angela,
I think u r confused. There is nothing like how thred will come to know it's upto you what u want from a thread to do for you.
If u wish that ur thread should wait for messages u can give code for it to listen at the specific port number using sockets here thread will keep on waiting untill it receives some data.
When u ask of when it should disconnect and terminate then u can specify a particular message like if the incoming data is QUIT or BYE as u wish then the connection should be closed and thread terminated.
Neeraj Thakkar
------------------
Neeraj Thakkar<br />"Try to get what you like,Else you will be forced to like what you get."