def ping(self): """ Send a ping request to the Agent. The response will be intercepted by a message handler, and the last_pong identifier updated at some point in the future. """ self.last_ping += 1 self.write(SystemRequestFactory.ping().setId(self.last_ping).build())