Check socket openness with isopen.
Merge pull request #2 from dcjones/master

Check socket openness with isopen.