Connection handlers returned as Generator are useless
Created by: vtexier
@Insoleet : the function conn_handler()
in peer.py
does not return a ConnectIonHandler
instance, but a Generator
.
I have study how you use it in Sakia, to understand the use of a Generator, but I don't...
if self.server:
yield ConnectionHandler("https", "wss", self.server, self.port, self.path, proxy, session)
elif self.ipv6:
yield ConnectionHandler("https", "wss", "[{0}]".format(self.ipv6), self.port, self.path, proxy, session)
else:
yield ConnectionHandler("https", "wss", self.ipv4, self.port, self.path, proxy, session)
Can you take some time to explain it so I can add better documentation in docstring and examples ?