'Sends queued requests.  Returns False on failure.'

def send_requests(self):

    make_dict = (lambda (m, p, i): {'method': m, 'params': p, 'id': i})
    n = self.num_requests()
    wire_requests = self.unsent_requests[0:n]
    try:
        self.pipe.send_all(map(make_dict, wire_requests))
    except socket.error as e:
        self.print_error('socket    error:', e)
        return False
    self.unsent_requests = self.unsent_requests[n:]
    for request in wire_requests:
        if self.debug:
            self.print_error('-->', request)
        self.unanswered_requests[request[2]] = request
    return True
