C Programming in Linux Tutorial using GCC compiler. Tutorial should also be applicable in C/UNIX programming. An example on how to use the select() function to create a timeout for the read() function. One of its uses is in TCP/IP socket communication where the server or client timeout when the other party does not send any data or acknowledgement. The example reads an input from the user, and times out if no user input for a period of time.