use new methods
rework socket api
more api changes
more api changes
ensure new methods are used
refactor and add docs
Merge pull request #104 from mikey179/master

work for 4.0.0