Connect to the server and return streams for communication.
(self)
| 96 | tg.cancel_scope.cancel() |
| 97 | |
| 98 | async def __aenter__(self) -> TransportStreams: |
| 99 | """Connect to the server and return streams for communication.""" |
| 100 | self._cm = self._connect() |
| 101 | return await self._cm.__aenter__() |
| 102 | |
| 103 | async def __aexit__( |
| 104 | self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None |