Skip to content
Snippets Groups Projects
remoteline.py 588 B
Newer Older
  • Learn to ignore specific revisions
  • import ipaddress
    import time
    
    import remoteconnection
    
    
    class RemoteLine(remoteconnection.RemoteConnection):
        def __init__(self, ip: ipaddress.IPv4Address, pk: bytes, cap: float, ucap: float,
                     cons, ll):
            super().__init__(ip, pk, cap, ucap, ll)
            self.adjacentConnections = cons
    
    
    
    class SignedRemoteLine:
        def __init__(self, line: RemoteLine, prev: 'SignedRemoteLine'):
            self.line = line
            self.previous: SignedRemoteLine = prev
            self.timestamp = time.time_ns()
            self.isOrigin = False
            self.signature: bytes = bytes(0)