|
yaaa I m using select call b4 doing read on socket .
so the code is somewhat like this
//thread 1
==========================================
int retval = select(.....)//Now the thread is blocked and it will be awaked whn something is thr to read from socket.
if(retval == -1)
cout<<"error"<<endl;
else
int numBytes = read(sockid,buf,SIZE);
============================================
is dis fine ????
|