I got it working, thanks for all the help guys. I have 1 other question.
Is there anyway to time how long I spend on a certain function call, namely read(), and if it sits idle for too long to timeout?
If you havent guessed/noticed we are writing a web server and in order to serve clients...