Merge pull request #7 from kramarz/master

Wrap exceptions of connecting to socket.
Bump version.
Refactor encoding values in api.