Method
__init__
(
self,
addrinfo: List[Tuple],
connect: Callable[
[socket.AddressFamily, Tuple], Tuple[IOStream, "Future[IOStream]"]
],
)
Source from the content-addressed store, hash-verified
| 57 | """ |
| 58 | |
| 59 | def __init__( |
| 60 | self, |
| 61 | addrinfo: List[Tuple], |
| 62 | connect: Callable[ |
| 63 | [socket.AddressFamily, Tuple], Tuple[IOStream, "Future[IOStream]"] |
| 64 | ], |
| 65 | ) -> None: |
| 66 | self.io_loop = IOLoop.current() |
| 67 | self.connect = connect |
| 68 | |
| 69 | self.future = ( |
| 70 | Future() |
| 71 | ) # type: Future[Tuple[socket.AddressFamily, Any, IOStream]] |
| 72 | self.timeout = None # type: Optional[object] |
| 73 | self.connect_timeout = None # type: Optional[object] |
| 74 | self.last_error = None # type: Optional[Exception] |
| 75 | self.remaining = len(addrinfo) |
| 76 | self.primary_addrs, self.secondary_addrs = self.split(addrinfo) |
| 77 | self.streams = set() # type: Set[IOStream] |
| 78 | |
| 79 | @staticmethod |
| 80 | def split( |
Callers
nothing calls this directly
Tested by
no test coverage detected