Fixed some typos, a couple of errors ("client" where "server" is meant, etc.), and improved the code style for the example. Indentation also changed to 4 spaces to match the rest of the docs, sorry for the big diff.