mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 06:30:53 +00:00
interop utilities for mplex ping
This commit is contained in:
33
interop/exec/native_ping.py
Normal file
33
interop/exec/native_ping.py
Normal file
@ -0,0 +1,33 @@
|
||||
import trio
|
||||
|
||||
from interop.exec.config.mod import (
|
||||
Config,
|
||||
ConfigError,
|
||||
)
|
||||
from interop.lib import (
|
||||
run_test,
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
try:
|
||||
config = Config.from_env()
|
||||
except ConfigError as e:
|
||||
print(f"Config error: {e}")
|
||||
return
|
||||
|
||||
# Uncomment and implement when ready
|
||||
_ = await run_test(
|
||||
config.transport,
|
||||
config.ip,
|
||||
config.port,
|
||||
config.is_dialer,
|
||||
config.test_timeout,
|
||||
config.redis_addr,
|
||||
config.sec_protocol,
|
||||
config.muxer,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
trio.run(main)
|
||||
Reference in New Issue
Block a user