def send(self,message,message_type,topic='<STR_LIT>'):
if message_type == RAW:<EOL><INDENT>self._sock.send(message)<EOL><DEDENT>elif message_type == PYOBJ:<EOL><INDENT>self._sock.send_pyobj(message)<EOL><DEDENT>elif message_type == JSON:<EOL><INDENT>self._sock.send_json(message)<EOL><DEDENT>elif message_type == MULTIPART:<EOL><INDENT>self._sock.send_multipart([topic, message])<EOL><DEDENT>elif message_type == STRING:<EOL><INDENT>self._sock.send_string(message)<EOL><DEDENT>elif message_type == UNICODE:<EOL><INDENT>self._sock.send_unicode(message)<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>"%(message_type,))<EOL><DEDENT>
Send the message on the socket.

Args:
    - message: the message to publish
    - message_type: the type of message being sent
    - topic: the topic on which to send the message. Defaults to ''.