[Pkg-privacy-commits] [obfsproxy] 215/353: rename handshake to circuitConnected, since it is just a callback and you don't *need* to do any sort of handshake

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository obfsproxy.

commit 61a97bfe3c6ae5961345b1cc76cbc35ffa1b5b8a
Author: Ximin Luo <infinity0 at gmx.com>
Date:   Wed Dec 11 15:44:23 2013 +0000

    rename handshake to circuitConnected, since it is just a callback and you don't *need* to do any sort of handshake
---
 obfsproxy/network/network.py  | 6 +++---
 obfsproxy/transports/base.py  | 4 ++--
 obfsproxy/transports/obfs2.py | 2 +-
 obfsproxy/transports/obfs3.py | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/obfsproxy/network/network.py b/obfsproxy/network/network.py
index d1a4f6a..78b4484 100644
--- a/obfsproxy/network/network.py
+++ b/obfsproxy/network/network.py
@@ -126,14 +126,14 @@ class Circuit(Protocol):
         # Call the transport-specific handshake method since this is a
         # good time to perform a handshake.
         self.transport.circuit = self
-        self.transport.handshake()
+        self.transport.circuitConnected()
 
         # Do a dummy dataReceived on the initiating connection in case
         # it has any buffered data that must be flushed to the network.
         #
         # (We use callLater because we want to return back to the
-        # event loop so that our handshake() messages get sent to the
-        # network immediately.)
+        # event loop so that any messages we send in circuitConnected get sent
+        # to the network immediately.)
         reactor.callLater(0.01, conn_to_flush.dataReceived, '')
 
     def dataReceived(self, data, conn):
diff --git a/obfsproxy/transports/base.py b/obfsproxy/transports/base.py
index 2a05170..71bac88 100644
--- a/obfsproxy/transports/base.py
+++ b/obfsproxy/transports/base.py
@@ -30,7 +30,7 @@ class BaseTransport(object):
     override and customize.
 
     Attributes:
-    circuit: Circuit object. This is set just before handshake is called.
+    circuit: Circuit object. This is set just before circuitConnected is called.
     """
 
     def __init__(self):
@@ -79,7 +79,7 @@ class BaseTransport(object):
         """
         return None
 
-    def handshake(self):
+    def circuitConnected(self):
         """
         The Circuit 'self.circuit' was completed, and this is a good time
         to do your transport-specific handshake on its downstream side.
diff --git a/obfsproxy/transports/obfs2.py b/obfsproxy/transports/obfs2.py
index f0f1064..bf78ffa 100644
--- a/obfsproxy/transports/obfs2.py
+++ b/obfsproxy/transports/obfs2.py
@@ -150,7 +150,7 @@ class Obfs2Transport(base.BaseTransport):
 
         self.shared_secret = args[0][14:]
 
-    def handshake(self):
+    def circuitConnected(self):
         """
         Do the obfs2 handshake:
         SEED | E_PAD_KEY( UINT32(MAGIC_VALUE) | UINT32(PADLEN) | WR(PADLEN) )
diff --git a/obfsproxy/transports/obfs3.py b/obfsproxy/transports/obfs3.py
index 32d03f9..8fe9a39 100644
--- a/obfsproxy/transports/obfs3.py
+++ b/obfsproxy/transports/obfs3.py
@@ -68,7 +68,7 @@ class Obfs3Transport(base.BaseTransport):
         self.recv_magic_const = None
         self.we_are_initiator = None
 
-    def handshake(self):
+    def circuitConnected(self):
         """
         Do the obfs3 handshake:
         PUBKEY | WR(PADLEN)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git



More information about the Pkg-privacy-commits mailing list