问题
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