def __init__(self, sock, loop):

    self.loop = loop
    self.sock = sock

    self.app = Application(handlers=[(r'/.*$', Blackhole)])
    self.server = HTTPServer(self.app, io_loop=self.loop)
    self.server.add_sockets([sock])

    self.sock.listen(1024)
Construct an HTTP server on a socket given an ioloop.
dataset/ETHPy150Open wickman/compactor/compactor/httpd.py/HTTPD.__init__