当前位置:网站首页>Socat uses "suggestions collection"

Socat uses "suggestions collection"

2022-07-23 19:35:00 Full stack programmer webmaster

Hello everyone , I meet you again , I'm your friend, Quan Jun .

use socat Try a few netcat Common usage , The comparison is as follows : 1. listen tcp 12345 port # nc -l 127.0.0.1 12345 # socat tcp-listen:12345 – 2. Far away tcp 12345 The port sends Braille # echo “test” | nc 127.0.0.1 12345 # echo “test” | socat – tcp-connect:127.0.0.1:12345 3. listen udp 23456 port # nc -u -l 127.0.0.1 23456 # socat udp-listen:23456 – 4. Far away udp 23456 The port sends Braille # echo “test” | nc -u 127.0.0.1 23456 # echo “test” | socat – udp-connect:127.0.0.1:23456 5. listen unix socket /tmp/unix.socket # nc -U -l /tmp/unix.socket netcat No, -U Options # socat unix-listen:/tmp/unix.socket – 6. To the local unix socket /tmp/unix.socket Send Braille # echo “test” | nc -U /tmp/unix.socket netcat No, -U Options # echo “test” | socat – unix-connect:/tmp/unix.sock 7. Listen to local unix datagram socket /tmp/unix.dg.sock nc110 Uncertain ,netcat Not sure # socat unix-recvfrom:/tmp/unix.dg.sock – 8. To the local unix datagram socket /dev/log Send Braille nc110 Uncertain ,netcat Not sure # echo “test” | socat – unix-sendto:/tmp/unix.dg.sock

Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/126805.html Link to the original text :https://javaforall.cn

原网站

版权声明
本文为[Full stack programmer webmaster]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207231756257718.html