Using sockets, I am not sure how to set the timeout?
thanks
int sock, connected, bytes_recieved; char send_data [128] , recv_data[128]; SOCKAD
you can use:
fd_set fd; timeval tv; FD_ZERO(&fd); FD_SET(sock, &fd); tv.tv_sec = time_out(second); tv.tv_usec = 0;
to set timeout for sending,receiving data.