How to make an Echo server with Bash?

后端 未结 5 1471
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 20:58

How to write a echo server bash script using tools like nc, echo, xargs, etc capable of simultaneously processing requests from multiple clients each with durable connection

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 21:31

    Here are some examples. ncat simple services

    TCP echo server

    ncat -l 2000 --keep-open --exec "/bin/cat"
    

    UDP echo server

    ncat -l 2000 --keep-open --udp --exec "/bin/cat"
    

提交回复
热议问题