Updated reference code for RFC 27

* also added command examples for RFC 27
Merge pull request #22 from hintjens/master

Added protocol examples