how to listen both udp and tcp from the same port?

感情迁移 提交于 2020-07-08 00:50:06

问题


I am using socat

server - > socat TCP-LISTEN:4444 STDOUT || socat UDP:LISTEN:4444 STDOUT

client - > socat - UDP:localhost:4444

When I try to connect with udp, I cannot connect, but it happens with tcp. what should I do? ,where is the mistake?


回答1:


A quick look of the socat man page shows UDP:LISTEN doesn't make sense.

It looks like you want:

socat TCP-LISTEN:4444 STDOUT || socat UDP-LISTEN:4444 STDOUT

You have a typo, colon instead of hyphen.



来源:https://stackoverflow.com/questions/62659700/how-to-listen-both-udp-and-tcp-from-the-same-port

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!