Implementing protocol on client. wip.

Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>