diff options
Diffstat (limited to 'contrib/perl5/eg/server')
-rwxr-xr-x | contrib/perl5/eg/server | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/contrib/perl5/eg/server b/contrib/perl5/eg/server deleted file mode 100755 index 49a140a..0000000 --- a/contrib/perl5/eg/server +++ /dev/null @@ -1,27 +0,0 @@ -#!./perl - -$pat = 'S n C4 x8'; -$inet = 2; -$echo = 7; -$smtp = 25; -$nntp = 119; - -$this = pack($pat,$inet,2345, 0,0,0,0); -select(NS); $| = 1; select(stdout); - -if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; } -if (bind(S,$this)) { print "bind ok\n"; } else { die $!; } -if (listen(S,5)) { print "listen ok\n"; } else { die $!; } -for (;;) { - print "Listening again\n"; - if ($addr = accept(NS,S)) { print "accept ok\n"; } else { die $!; } - - @ary = unpack($pat,$addr); - $, = ' '; - print @ary; print "\n"; - - while (<NS>) { - print; - print NS; - } -} |