A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets.
In Perl, IO::Socket::INET provides an object interface to creating and using sockets in the AF_INET domain. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket.
Below is a simple server created using Perl IO::Socket::INET module
Source: server.pl
#!/usr/bin/perl
use IO::Socket::INET;
$socket = new IO::Socket::INET (
LocalHost => '127.0.0.1',
LocalPort => '40000',
Proto => 'tcp',
Listen => 10,
Reuse => 1
) or die "Oops: $! \n";
Continue Reading...
In Perl, IO::Socket::INET provides an object interface to creating and using sockets in the AF_INET domain. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket.
Below is a simple server created using Perl IO::Socket::INET module
Source: server.pl
#!/usr/bin/perl
use IO::Socket::INET;
$socket = new IO::Socket::INET (
LocalHost => '127.0.0.1',
LocalPort => '40000',
Proto => 'tcp',
Listen => 10,
Reuse => 1
) or die "Oops: $! \n";
0 comments:
Post a Comment