'Send `data\' to the server.'

def send(self, data):

    if (self.sock is None):
        if self.auto_open:
            self.connect()
        else:
            raise NotConnected()
    if (self.debuglevel > 0):
        print 'send:', repr(data)
    blocksize = 8192
    if (hasattr(data, 'read') and (not isinstance(data, array))):
        if (self.debuglevel > 0):
            print 'sendIng    a    read()able'
        datablock = data.read(blocksize)
        while datablock:
            self.sock.sendall(datablock)
            datablock = data.read(blocksize)
    else:
        self.sock.sendall(data)
