Add timeout and timeouts config options

Fixes #11
This will close the socket after it's been open for a certain amount of time. Shouldn't it close the socket after it's been idle for a certain amount of time?