'Close a channel.
@type channel:  subclass of L{SSHChannel}'

def sendClose(self, channel):

    if channel.localClosed:
        return
    log.msg(('sending    close    %i' % channel.id))
    self.transport.sendPacket(MSG_CHANNEL_CLOSE, struct.pack('>L', self.channelsToRemoteChannel[channel]))
    channel.localClosed = True
    if (channel.localClosed and channel.remoteClosed):
        self.channelClosed(channel)
