Introduction ------------ bcast-server.pl is a TCP service that takes input data from one source connected via localhost (127.0.0.1), and re-sends one copy of the input data to each connected TCP client. The intended use of this service is for broadcasting real-time data associated with bitcoin exchange trading. The data format is unspecified, that is left entirely up to the broadcaster. Text-based formats are strongly recommended. Dependencies ------------ You must install the following software, before you may use bcast: 1) perl 2) perl modules Net::Netmask, POE::Component::Client::TCP, POE::Component::Server::TCP. On Fedora/RHEL/CentOS, these packages are perl-Net-Netmask perl-POE Linux Installation ------------------ Copy bcast.pl and bcast-server.pl to a useful location. Make sure they are marked executable via chmod 0755 bcast.pl chmod 0755 bcast-server.pl Configuration file (optional) ------------------ Many command line arguments for bcast-server.pl may be specified in a configuration file. In addition, the configuration file is the only available method for filtering out abusive IP addresses. Sample configuration file: # # Sample bcast-server.pl configuration file # # enable debug output debug # set client port port 27007 # set port for our data submissions subport 37007 # refuse connections from 192.168.0.* filter 192.168.0.0/24 Running bcast-server.pl ----------------------- bcast-server.pl does not fork, or put itself into the background. You must do this yourself. Normally, this is done via something like this: nohup nice /path/to/my/bcast-server.pl & Running bcast.pl ---------------- To ease the process of connecting to the server for the purposes of broadcasting data, you may use bcast.pl. Broadcasting data from standard input: echo "BID PayPalUSD 100 0.06" | /path/to/my/bcast.pl Broadcasting data from a file: /path/to/my/bcast.pl --data=/tmp/my-trade-data.txt Additional help --------------- Full command line help is available via "--help", and even more full command line help is available via "--man" for a manual page. # ./bcast.pl --man or # ./bcast-server.pl --help etc.