commit f238b5b4978fc968fcd31b205ab80272a12629b7 Author: Illia Volochii illia.volochii@gmail.com Date: Thu Apr 23 20:56:33 2020 +0300
Move `get_socket` to `_BaseControllerSocketMixin` --- stem/control.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/stem/control.py b/stem/control.py index e264e4b5..50dff89f 100644 --- a/stem/control.py +++ b/stem/control.py @@ -589,6 +589,16 @@ class _BaseControllerSocketMixin:
return self._socket.connection_time()
+ def get_socket(self): + """ + Provides the socket used to speak with the tor process. Communicating with + the socket directly isn't advised since it may confuse this controller. + + :returns: :class:`~stem.socket.ControlSocket` we're communicating with + """ + + return self._socket +
class BaseController(_BaseControllerSocketMixin): """ @@ -768,16 +778,6 @@ class BaseController(_BaseControllerSocketMixin): if t.is_alive() and threading.current_thread() != t: t.join()
- def get_socket(self) -> stem.socket.ControlSocket: - """ - Provides the socket used to speak with the tor process. Communicating with - the socket directly isn't advised since it may confuse this controller. - - :returns: :class:`~stem.socket.ControlSocket` we're communicating with - """ - - return self._socket - def get_latest_heartbeat(self) -> float: """ Provides the unix timestamp for when we last heard from tor. This is zero