Support read(n=-1)

Now, `n=-1` indicates that we want to read until EOF. However, now we
only read until we have no new message.
This commit is contained in:
mhchia
2019-08-12 14:25:17 +08:00
committed by Kevin Mai-Husan Chia
parent 9cb6ec1c48
commit 9f8276fa84
2 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import asyncio
from typing import Dict, Tuple, Optional
from typing import Dict, Optional, Tuple
from multiaddr import Multiaddr