0

I'm running a 32-bits old version of CentOS in a offline LAN network. I'd like to setup communication between all hosts, pretty much like nc -l 5555 + nc <ip1> 5555 works. Well, I'm aware that netcat only allows a single running instance for each port, however I'd like an alternative I could build from source (or even a script using the current netcat) that supports multiple connections at once, such that I could setup like a hub for all clients inside the network. I'd like to get like a group chat running, where a client sends a message to the hub that broadcasted to all clients (except the one who sent it). Is it possible?

Linux 2.6.18-92.el5 i686 i386 GNU/Linux

1 Answers1

0

If you need to handle multiple simultaneous connections on your "hub", take a look at netcat as a multithread server. You'll have to use something like tcpserver that can handle multiple operations

For consecutive connections (one at a time), it may be simpler to use a shell script that just forwards the output to your other clients and restarts netcat after it finishes.


If you mean a literal group chat message service, then you might prefer an IRC server, like inspIRCd

Cpt.Whale
  • 10,914