ttl as int

This commit is contained in:
Chih Cheng Liang 2019-08-05 17:02:18 +08:00
parent 63c733c3f5
commit cb3a59e0ac
No known key found for this signature in database
GPG Key ID: C86B5E6612B1487A
2 changed files with 6 additions and 6 deletions

View File

@ -112,7 +112,7 @@ class IMuxedStream(ABC):
"""
@abstractmethod
def set_deadline(self, ttl: float) -> bool:
def set_deadline(self, ttl: int) -> bool:
"""
set deadline for muxed stream
:return: a new stream

View File

@ -13,8 +13,8 @@ class MplexStream(IMuxedStream):
stream_id: int
initiator: bool
mplex_conn: IMuxedConn
read_deadline: float
write_deadline: float
read_deadline: int
write_deadline: int
local_closed: bool
remote_closed: bool
stream_lock: asyncio.Lock
@ -103,7 +103,7 @@ class MplexStream(IMuxedStream):
return True
# TODO deadline not in use
def set_deadline(self, ttl: float) -> bool:
def set_deadline(self, ttl: int) -> bool:
"""
set deadline for muxed stream
:return: True if successful
@ -112,7 +112,7 @@ class MplexStream(IMuxedStream):
self.write_deadline = ttl
return True
def set_read_deadline(self, ttl: float) -> bool:
def set_read_deadline(self, ttl: int) -> bool:
"""
set read deadline for muxed stream
:return: True if successful
@ -120,7 +120,7 @@ class MplexStream(IMuxedStream):
self.read_deadline = ttl
return True
def set_write_deadline(self, ttl: float) -> bool:
def set_write_deadline(self, ttl: int) -> bool:
"""
set write deadline for muxed stream
:return: True if successful