Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Added a destroy method to Circuit objects (needs tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- committed Jul 29, 2013
1 parent 6de2bf2 commit 445b846
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torpylle.py
Expand Up @@ -794,6 +794,12 @@ def extend(self, node, use_relay_early=True):
hop = TorHop(node, x=local_keymaterial, gx=local_DHpubkey,
gy=peer_keymaterial, KH=peer_derivativekeydata)
self.hops.append(hop)
def destroy(self, reason=0):
"""
Tears down the Circuit.
"""
self.socket.send(CellDestroy(CircID=self.circid,
ErrorCode=reason))
def resolve(self, name):
"""
Resolves a name (that can be a .in-addr.arpa address) through
Expand Down

0 comments on commit 445b846

Please sign in to comment.