Support connection timeout

This commit is contained in:
Lonami Exo
2018-10-04 16:39:57 +02:00
parent 0cc8bca098
commit db83709c6b
9 changed files with 30 additions and 22 deletions

View File

@@ -8,8 +8,8 @@ class ConnectionTcpIntermediate(Connection):
Intermediate mode between `ConnectionTcpFull` and `ConnectionTcpAbridged`.
Always sends 4 extra bytes for the packet length.
"""
async def connect(self):
await super().connect()
async def connect(self, timeout=None):
await super().connect(timeout=timeout)
await self.send(b'\xee\xee\xee\xee')
def _send(self, data):