'Send a message to the browser.
*message* should be convertable to a string; unicode objects should be
encodable as utf-8.  Raises socket.error with errno of 32
(broken pipe) if the socket has already been closed by the client.'

def send(self, message):

    if (self.version in ['7', '8', '13']):
        (packed, lenhead, lentail) = self.encode_hybi(message, opcode=1, base64=False)
    else:
        packed = self._pack_message(message)
    try:
        self.socket.sendall(packed)
    finally:
        pass
