Then ideally:
would check if I need to accept() or not? So it seems spliced some code together didn't know I could select() something that hasn't been accept()ed should work thanks;Code:bool MySocket::HasData() { timeval tv; tv.tv_sec = 0; tv.tv_usec = 10000; fd_set readset; FD_ZERO(&readset); FD_SET(fd, &readset); int result = select(fd, &readset, NULL, NULL, &tv); if(result > 0) //Has data! { cout<<"Y"; return true; }else return false; //No Data! }