def _on_gateway(self, header, payload, rest, addr):
if payload.get('<STR_LIT>') == SERVICE_UDP:<EOL><INDENT>self.gateway = Gateway(addr[<NUM_LIT:0>], payload['<STR_LIT:port>'], header.gateway)<EOL>self.gateway_found_event.set()<EOL><DEDENT>
Records a discovered gateway, for connecting to later.