tags:

views:

50

answers:

2

Hi,

In perl, is there a way to broadcast a file from a server socket to multiple client sockets? I want to transfer a single file to multiple systems in least amount of time.

Thanks,
Akshey

+1  A: 

Over what sort of network? IP multicast is generally usable over a LAN, but not really supported over the Internet.

Note that multicast requires special software for both client & server. You probably don't want to write your own; there are some implementations linked from the Wikipedia article.

cjm
A: 

You could possibly set something up with UDP, sending packets willy-nilly. But that seems self-defeating, because you'd have to make up for lost packets.

I would just do each separately in pretty much the normal way. You could start a separate execution thread or fork for each recipient though, so that they ran in parallel.

tchrist