in reply to Communication between mltiple scripts(&&servers)
I wrote a tutorial about this sort of thing a while back, which includes a few caveats (<grouse>including one which no-one believes exists... If nothing else, the documentation tells you not to use buffered IO with select, so stop doing it, dammit</grouse> ahem). If your requirements are simpler, you can use the other tutorial
Run servers on the slave machines, and clients on the master machine (in case you didn't find that totally obvious...). If you can connect to the slaves from the outside world, you will need some sort of security - either block the port at your router or firewall, or just check the originating IP with a piece of code like:
I think if you check the address against a list of allowed addresses, that'll do the trick; it's fairly hard to spoof a TCP connection these days :-)# $sock is the socket: this will work if you aren't using IO::Socket: ($port, $iaddr) = sockaddr_in(getpeername($sock)); $peer_addr = inet_ntoa($iaddr); # String, numbers and dots notation # Or, if you're using IO::Socket $peer_addr = $sock->peerhost();
Andrew.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Communication between mltiple scripts(&&servers)
by ahunter (Monk) on Oct 10, 2000 at 01:54 UTC |