ttl as int
This commit is contained in:
parent
63c733c3f5
commit
cb3a59e0ac
|
@ -112,7 +112,7 @@ class IMuxedStream(ABC):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def set_deadline(self, ttl: float) -> bool:
|
def set_deadline(self, ttl: int) -> bool:
|
||||||
"""
|
"""
|
||||||
set deadline for muxed stream
|
set deadline for muxed stream
|
||||||
:return: a new stream
|
:return: a new stream
|
||||||
|
|
|
@ -13,8 +13,8 @@ class MplexStream(IMuxedStream):
|
||||||
stream_id: int
|
stream_id: int
|
||||||
initiator: bool
|
initiator: bool
|
||||||
mplex_conn: IMuxedConn
|
mplex_conn: IMuxedConn
|
||||||
read_deadline: float
|
read_deadline: int
|
||||||
write_deadline: float
|
write_deadline: int
|
||||||
local_closed: bool
|
local_closed: bool
|
||||||
remote_closed: bool
|
remote_closed: bool
|
||||||
stream_lock: asyncio.Lock
|
stream_lock: asyncio.Lock
|
||||||
|
@ -103,7 +103,7 @@ class MplexStream(IMuxedStream):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# TODO deadline not in use
|
# TODO deadline not in use
|
||||||
def set_deadline(self, ttl: float) -> bool:
|
def set_deadline(self, ttl: int) -> bool:
|
||||||
"""
|
"""
|
||||||
set deadline for muxed stream
|
set deadline for muxed stream
|
||||||
:return: True if successful
|
:return: True if successful
|
||||||
|
@ -112,7 +112,7 @@ class MplexStream(IMuxedStream):
|
||||||
self.write_deadline = ttl
|
self.write_deadline = ttl
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def set_read_deadline(self, ttl: float) -> bool:
|
def set_read_deadline(self, ttl: int) -> bool:
|
||||||
"""
|
"""
|
||||||
set read deadline for muxed stream
|
set read deadline for muxed stream
|
||||||
:return: True if successful
|
:return: True if successful
|
||||||
|
@ -120,7 +120,7 @@ class MplexStream(IMuxedStream):
|
||||||
self.read_deadline = ttl
|
self.read_deadline = ttl
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def set_write_deadline(self, ttl: float) -> bool:
|
def set_write_deadline(self, ttl: int) -> bool:
|
||||||
"""
|
"""
|
||||||
set write deadline for muxed stream
|
set write deadline for muxed stream
|
||||||
:return: True if successful
|
:return: True if successful
|
||||||
|
|
Loading…
Reference in New Issue
Block a user