Added timeout event listener and configurable threshold
Merge pull request #1 from pertinky/master

Socket timeout handling