here goes....

i am writing a client socket function. i have 2 threads running
concurrently.

one thread will receive from the server.
....int ret_val;

ret_val = recv( socket, buff, sizeof(buff), 0);

since i am using blocking i/o , my thread will stop here until
i receive something from the server.

the problem is, when my other thread close the socket,
this thread is still waiting for a message from the server.
it will not return an error to my ret_val unlike the window
version.

help....what other ways that i can use to make my thread
exit gracefully, or better still return from the recv() funtion without
killing the thread????

thanks.