I'm looking for a linux tool to run under fedora that will open a tcp/ip socket for listening, let it connect multiple clients on the same port. Then when one client sends a message relay it to all other clients. Rather not relay it back to the original client, but if it does also relay back to the originating client that's ok. I'm not sure if "relay" is the right term here, maybe if i would have searched for another keyword i would have gotten better results. Just to be clear: there should not be a protocol on top of the socket by the server. If there is going to be a protocol it will be implemented on the client only both in sending and receiving. Further requirement is that reliability is the most important thing, that's why i'm looking for TCP/IP and not UDP. Any other suggestions to make it more reliable are welcome.
Some places i looked for a solution:
https://cr.yp.to/ucspi-tcp/tcpserver.html Spawns different instances of "program" which then still need to communicate to each other, so it's only a partial solution.
TCP Proxy with multiple clients? The solution i'm looking for does not connect to a port first, so doesn't seem suitable.
https://stackoverflow.com/questions/9024227/duplicate-input-unix-stream-to-multiple-tcp-clients-using-socat/11362423 I don't have a process writing to a socket, so doesn't seem suitable.
Even though the questions of the previous two links do not match mine, there are things in there that make me belief that socat could still be an option, but i'm not sure.