Encoding Server

Write a listening server that accepts a codec and loads data from a
client connection. The data is then encoded and sent to the client.
Step by step this means:
1 Open a TCP listening socket
2 Read first line from connection (the chosen encoding)
3 Read second line from connection (the data to be encoded)
4 Send the data back to the client in the chosen encoding
Use the encode method of the codecs module to encode data:
http://docs.python.org/3.3/library/codecs.html