How to make a blocking recv() call to be timeout ?

avoiding costly strtok call --- sscanf call an alternative