(self, pkt, send_function=None, address=None)
| 164 | print("%s ==> %s" % (req.summary(), reply.summary())) |
| 165 | |
| 166 | def reply(self, pkt, send_function=None, address=None): |
| 167 | # type: (Packet, Optional[Callable[..., None]], Optional[Any]) -> None |
| 168 | if not self.is_request(pkt): |
| 169 | return |
| 170 | if address: |
| 171 | # Only on AnsweringMachineTCP |
| 172 | reply = self.make_reply(pkt, address=address) # type: ignore |
| 173 | else: |
| 174 | reply = self.make_reply(pkt) |
| 175 | if not reply: |
| 176 | return |
| 177 | if send_function: |
| 178 | self.send_reply(reply, send_function=send_function) |
| 179 | else: |
| 180 | # Retro-compability. Remove this if eventually |
| 181 | self.send_reply(reply) |
| 182 | if self.verbose: |
| 183 | self.print_reply(pkt, reply) |
| 184 | |
| 185 | def run(self, *args, **kargs): |
| 186 | # type: (Any, Any) -> None |
no test coverage detected