Merge pull request #24 from hurtonm/master

Make socket functions EINTR safe
Add tests for channel class