Echo Server ExampleΒΆ

echoserver.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/usr/bin/env python

from circuits.net.sockets import TCPServer, Write

class EchoServer(TCPServer):

    def read(self, sock, data):
        self.push(Write(sock, data))

EchoServer(8000).run()

Previous topic

Examples

Next topic

Telnet Client Example

This Page