Enhanced API.
Implemented example client and server.

Closes #3