Re: Run a script every time a message is sent to a socket

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Sun, 08 Dec 2024 21:15:12 +0000

>I have a socket setup up by another program
>which I want to read from and run a script every time a message arrives making use of said message.
>I have, up until now, done this using socat,
>but I wonder if there is a way to solve this with skaware.

  I don't have a program to do this, no, because it's rare that you
handle datagram sockets on the command line. It's pretty easy to do
in C, though (especially if you're using skalibs ;))

  However, a design warning: if you're doing this, it's important to have
throttle/rate-limiting options. Because data can arrive on a socket
much,
much faster than you can spawn a script, and unless the sender is fully
trusted, it's a pretty good way to forkbomb and crash your machine.

--
  Laurent
Received on Sun Dec 08 2024 - 22:15:12 CET

This archive was generated by hypermail 2.4.0 : Sun Dec 08 2024 - 22:15:45 CET