def send_request(self, request, context, response_type, timeout_sec):
<EOL>reqid = REQID.generate()<EOL>Log.debug("<STR_LIT>" % (self._get_classname(), str(reqid)))<EOL>self.response_message_map[reqid] = response_type<EOL>self.context_map[reqid] = context<EOL>if timeout_sec > <NUM_LIT:0>:<EOL><INDENT>def timeout_task():<EOL><INDENT>self.handle_timeout(reqid)<EOL><DEDENT>self.looper.register_timer_task_in_sec(timeout_task, timeout_sec)<EOL><DEDENT>outgoing_pkt = OutgoingPacket.create_packet(reqid, request)<EOL>self._send_packet(outgoing_pkt)<EOL>
Sends a request message (REQID is non-zero)