Commit dd669db6 authored by Antoine Millet's avatar Antoine Millet
Browse files

Added a property to get the tunnel socket (if available, or None)

parent af9092ff
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ class TunnelProtocol(Protocol):
            self._endpoint, self._socket = socket.socketpair()
        else:
            self._endpoint = endpoint
            self._socket = None

        self._from_tun_to_endpoint_buf = ''
        self._asked = 0 # Data asked to the peer
@@ -83,6 +84,10 @@ class TunnelProtocol(Protocol):
# Public methods:
#

    @property
    def socket(self):
        return self._socket

    def end_of_message(self):
        '''
        Handle inbound data from the :class:`RpcConnection` peer and place it