(self, data)
Sends the given string of data as a packet over the underlying 
        stream. Blocks until the packet has been sent.
        
        :param data: the byte string to send as a packet
Sends the given string of data as a packet over the underlying 
        stream. Blocks until the packet has been sent.
        
        :param data: the byte string to send as a packet
Sends the given string of data as a packet over the underlying stream . Blocks until the packet has been sent . : param data : the byte string to send as a packet
def send(self, data):
        """Sends the given string of data as a packet over the underlying 
        stream. Blocks until the packet has been sent.
        
        :param data: the byte string to send as a packet
        """
        if self.compress and len(data) > self.COMPRESSION_THRESHOLD:
            compressed = 1
            data = zlib.compress(data, self.COMPRESSION_LEVEL)
        else:
            compressed = 0
        header = self.FRAME_HEADER.pack(len(data), compressed)
        buf = header + data + self.FLUSHER
        self.stream.write(buf)
def send ( self , data ) : if self . compress and len ( data ) > self . COMPRESSION_THRESHOLD : compressed = 1 data = zlib . compress ( data , self . COMPRESSION_LEVEL ) else : compressed = 0 header = self . FRAME_HEADER . pack ( len ( data ) , compressed ) buf = header + data + self . FLUSHER self . stream . write ( buf )