'Handle requests.
WARNING! You must call prepare() BEFORE calling handle()'

def handle(self):

    assert self.prepared, 'You    have    to    call    prepare    before    handle'
    (rset, wset, xset) = self._select()
    for readable in rset:
        if (readable == self._read.fileno()):
            self._read.recv(1024)
        elif (readable == self.socket.handle.fileno()):
            client = self.socket.accept().handle
            self.clients[client.fileno()] = Connection(client, self.wake_up)
        else:
            connection = self.clients[readable]
            connection.read()
            if (connection.status == WAIT_PROCESS):
                itransport = TTransport.TMemoryBuffer(connection.message)
                otransport = TTransport.TMemoryBuffer()
                iprot = self.in_protocol.getProtocol(itransport)
                oprot = self.out_protocol.getProtocol(otransport)
                self.tasks.put([self.processor, iprot, oprot, otransport, connection.ready])
    for writeable in wset:
        self.clients[writeable].write()
    for oob in xset:
        self.clients[oob].close()
        del self.clients[oob]
