Sunday, November 23, 2008

Perl: How to Set Up a UDP Server

You want to write a UDP server,
First bind to the port the server is to be contacted on. With IO::Socket, this is easily accomplished:
use IO::Socket;
$server = IO::Socket::INET->new(LocalPort => $server_port,
Proto => "udp")
or die "Couldn't be a udp server on port $server_port : $@\n"; read more..

No comments:


uptime