#!/usr/bin/perl -w

use Socket;

socket( CLIENT, PF_UNIX, SOCK_DGRAM, 0 ) or die;
connect( CLIENT, sockaddr_un( "/tmp/lamp-display-socket" )) or die;

$message = pack "CC", 0, 78;
$message .= "test";

select CLIENT;
$|=1;

@list = ( "LAMP is MIT's new electronic music library.",
	  "We will offer about 3,440 CDs for free listening",
	  "on-demand all across campus (anywhere with MIT cable).",
	  "LAMP will be up and down for improvements.",
	  "The launch is this Monday, October 27.",
	  "Comments or questions? lamp\@mit.edu");

$i = 0;

while(1) {
    $message = pack "CC", 0, 78;
    $message .= $list[$i++ % (scalar @list)];

    print $message;
    sleep 4;
}
