class EchoServerExample(TCPThreadedServer):

    def __init__(self):
        TCPThreadedServer.__init__(self, 'localhost', 1234, 'Server')

def process(self, data):
    print('EchoServer Got: ' + data)
return str.upper(data)
for i in range(10):
    echo = EchoServerExample()
echo.serve_forever()
response = client('localhost', 1234, 'hi-%i' % i)
print('Client received: ' + response)
echo.shutdown()
Start a TCPServer with ThreadingMixIn again in code directly after shutting it down. (Gives `Address already in use`)