Merge pull request #447 from pastoso/master

Handle socket closing and error opening
Changed some protocol node stuff

Made properties private
Added getters for private properties
Added return types in docu blocks
Added data getter
Big overhaul

Changed calls to protocol node properties into getter methods
Added more @param, @throws and @return in docu blocks
Cleaned up code
Fixed pretty much all warnings
Wasted my whole afternoon on this
*facepalm*
Nope nope nope nope nope

I am soooo done for today.
Time to go to bed -__-
Fixes in BinTreeNodeWriter
Last fix and some socket checks
Updated /tests/whatsapp.php

Using the new method names