Completed the sample code.

Added more info and made the server to listen in the sample code.

//cc @watson