http://twistedmatrix.com/documents/current/core/examples/