Skip to content

Commit c7108ba

Browse files
authored
Implement non-blocking TCP connection (
1 parent c4d427f commit c7108ba

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pyrogram/connection/transport/tcp/tcp_abridged.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

1919
import logging
20-
from typing import Optional
20+
from typing import Optional, Tuple
2121

22-
from .tcp import TCP
22+
from .tcp import TCP, Proxy
2323

2424
log = logging.getLogger(__name__)
2525

2626

2727
class TCPAbridged(TCP):
28-
def __init__(self, ipv6: bool, proxy: dict):
28+
def __init__(self, ipv6: bool, proxy: Proxy) -> None:
2929
super().__init__(ipv6, proxy)
3030

31-
async def connect(self, address: tuple):
31+
async def connect(self, address: Tuple[str, int]) -> None:
3232
await super().connect(address)
3333
await super().send(b"\xef")
3434

35-
async def send(self, data: bytes, *args):
35+
async def send(self, data: bytes, *args) -> None:
3636
length = len(data) // 4
3737

3838
await super().send(

0 commit comments

Comments
 (0)