def send(self, message, json=False, callback=None):
pkt = dict(type="<STR_LIT:message>", data=message, endpoint=self.ns_name)<EOL>if json:<EOL><INDENT>pkt['<STR_LIT:type>'] = "<STR_LIT>"<EOL><DEDENT>if callback:<EOL><INDENT>pkt['<STR_LIT>'] = True<EOL>pkt['<STR_LIT:id>'] = msgid = self.socket._get_next_msgid()<EOL>self.socket._save_ack_callback(msgid, callback)<EOL><DEDENT>self.socket.send_packet(pkt)<EOL>
Use send to send a simple string message.

        If ``json`` is True, the message will be encoded as a JSON object
        on the wire, and decoded on the other side.

        This is mostly for backwards compatibility.  ``emit()`` is more fun.

        :param callback: This is a callback function that will be
                         called automatically by the client upon
                         reception.  It does not verify that the
                         listener over there was completed with
                         success.  It just tells you that the browser
                         got a hold of the packet.
        :type callback: callable