diff options
Diffstat (limited to 'mknet')
-rwxr-xr-x | mknet | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -87,19 +87,21 @@ class Bandwidth: class LinkInfo: - def __init__(self, bandwidth, latency, jitter = None, offset = None, **kwargs): + def __init__(self, bandwidth, latency, jitter = None, offset = None, limit = None, **kwargs): self.bandwidth = Bandwidth(bandwidth) self.latency = Latency(latency, offset) self.jitter = Latency(jitter or 0) + self.limit = limit def __eq__(self, o): return (isinstance(o, LinkInfo) and o.bandwidth == self.bandwidth and o.latency == self.latency and - o.jitter == self.jitter) + o.jitter == self.jitter and + o.limit == self.limit) def __str__(self): - return f'LinkInfo{{bw: {self.bandwidth}, latency: {self.latency}, jitter: {self.jitter}}}' + return f'LinkInfo{{bw: {self.bandwidth}, latency: {self.latency}, jitter: {self.jitter}, limit: {self.limit}}}' class Server: def __init__(self, name, link): |