merge from Tom

cash gives ip address and version
some more socket stuff