Add "default protocols" that all hosts have by default

This commit is contained in:
Alex Stokes
2019-09-24 17:19:22 -07:00
parent 73251a0c36
commit c92bade815
3 changed files with 20 additions and 5 deletions

7
libp2p/host/defaults.py Normal file
View File

@ -0,0 +1,7 @@
from collections import OrderedDict
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from libp2p.typing import TProtocol, StreamHandlerFn
DEFAULT_HOST_PROTOCOLS: "OrderedDict[TProtocol, StreamHandlerFn]" = OrderedDict()