austinhartzheim / trixy

Create network listeners, tunnels, and outbound connections in a modular way allowing interception and modification of the traffic.
GNU General Public License v3.0
3 stars 0 forks source link

Self-contained outputs #6

Closed austinhartzheim closed 8 years ago

austinhartzheim commented 9 years ago

Evaluate whether TrixyOutput objects can be self-contained. This would allow them to maintain the autoconnect setting.

Also, it makes it easier for users of our code to create objects because they don't have to worry about the event loop.

austinhartzheim commented 8 years ago

Completed. Will be available in Trixy v3.

Here is the connect() method on the TrixyOutput class.

    def connect(self):
        coro = self.loop.create_connection(lambda: self, self.host, self.port)
        self.task = asyncio.async(coro)