Allow port number to be specified with tcp hostname

This commit is contained in:
DJ Holt
2024-09-16 23:24:03 -06:00
parent 584a14f578
commit bf904c6906

View File

@@ -1155,8 +1155,14 @@ def common():
)
elif args.host:
try:
if ":" in args.host:
tcp_hostname, tcp_port = args.host.split(':')
else:
tcp_hostname = args.host
tcp_port = 4403
client = meshtastic.tcp_interface.TCPInterface(
args.host,
tcp_hostname,
portNumber=tcp_port,
debugOut=logfile,
noProto=args.noproto,
noNodes=args.no_nodes,