| 20 | |
| 21 | |
| 22 | class RecordFlows: |
| 23 | def __init__(self, on_running): |
| 24 | self.running = on_running |
| 25 | self.http_connects = [] |
| 26 | self.tcp_flows = [] |
| 27 | |
| 28 | def http_connect(self, flow): |
| 29 | self.http_connects.append(flow) |
| 30 | |
| 31 | def tcp_start(self, flow): |
| 32 | self.tcp_flows.append(flow) |
| 33 | |
| 34 | def get_http_connects(self): |
| 35 | http_connects, self.http_connects[:] = self.http_connects[:], [] |
| 36 | return http_connects |
| 37 | |
| 38 | def get_tcp_flows(self): |
| 39 | tcp_flows, self.tcp_flows[:] = self.tcp_flows[:], [] |
| 40 | return tcp_flows |
| 41 | |
| 42 | def reset(self): |
| 43 | self.http_connects = [] |
| 44 | self.tcp_flows = [] |
| 45 | |
| 46 | |
| 47 | class AlterRequest: |
no outgoing calls
no test coverage detected
searching dependent graphs…