'Send a request to a channel.
@type channel:      subclass of C{SSHChannel}
@type requestType:  L{bytes}
@type data:         L{bytes}
@type wantReply:    L{bool}
@rtype              C{Deferred}/L{None}'

def sendRequest(self, channel, requestType, data, wantReply=0):

    if channel.localClosed:
        return
    log.msg(('sending    request    %r' % requestType))
    self.transport.sendPacket(MSG_CHANNEL_REQUEST, (((struct.pack('>L', self.channelsToRemoteChannel[channel]) + common.NS(requestType)) + chr(wantReply)) + data))
    if wantReply:
        d = defer.Deferred()
        self.deferreds.setdefault(channel.id, []).append(d)
        return d
