#!/usr/local/bin/perl -w
use IO::Socket::INET;

while (1) {
	sleep 1;
	my $sock = IO::Socket::INET->new(PeerAddr=>'64.62.161.79:1942',Proto=>'udp');
	unless($sock) {
		print "no socket\n";
		next;
	}
	my ($localhost,$localport) = ($sock->sockhost(),$sock->sockport());
	my ($remotehost,$remoteport) = ($sock->peerhost(),$sock->peerport());
	$sock->send('');
	print "$localhost:$localport -> $remotehost:$remoteport\n";
	undef $sock;
}
