Scap previous implementation and use select.
Added comment.
Fix typo.
Merge pull request #1 from savonet/socket-test

Socket protection.