Commit 8275bdb2 authored by Antoine Millet's avatar Antoine Millet
Browse files

Tunnel now use Protocol.create_watcher instead of RpcConnection.create_watcher

parent 63304cb9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,12 +37,12 @@ class TunnelProtocol(Protocol):
        # Create watcher to handle data coming from the endpoint:
        props = dict(fd=self._endpoint, events=pyev.EV_READ,
                     callback=self._handle_from_endpoint)
        self._endpoint_reader = self._connection.create_watcher(pyev.Io, **props)
        self._endpoint_reader = self.create_watcher(pyev.Io, **props)

        # Create watcher to handle data going to the endpoint:
        props = dict(fd=self._endpoint, events=pyev.EV_WRITE,
                     callback=self._handle_from_tunnel)
        self._endpoint_writer = self._connection.create_watcher(pyev.Io, **props)
        self._endpoint_writer = self.create_watcher(pyev.Io, **props)

        self._connection.rpc.send_special('protoctl', label=self._label,
                                          type='ready')