[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Perl MUD script to MacPerl?



Hi, there's a very interesting MUD script written in Perl by Thomas Boutell
described at http://www.boutell.com/perlmud/
It works with perl5 only, and requires the use of sockets.

If it is possible to port this script to MacPerl (i.e. mainly if MacPerl 5 
fully supports sockets yet), would anyone be interested in doing so?
I think this script would be a significant improvement over existing mac
talk servers, especially if anyone with telnet access can connect.

Here's a snippet to help you judge the feasibility of this task:

#Set up listener socket
$AF_INET = 2;
$SOCK_STREAM = 1;
$sockaddr = 'S n a4 x8';
($name, $aliases, $proto) = getprotobyname("tcp");

$this = pack($sockaddr, $AF_INET, $port, "\0\0\0\0");

if (!socket(LISTENER, $AF_INET, $SOCK_STREAM, $proto)) {
        print "Couldn't create listener socket.\n";
        print "This Perl implementation probably does not support 
sockets.\n";
        exit 1;
}

#Make sure we can reuse this quickly after a shutdown
setsockopt(LISTENER, SOL_SOCKET, SO_REUSEADDR, 1);
setsockopt(LISTENER, SOL_SOCKET, SO_LINGER, 0);


-- 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Doug Holton, mailto:dlh@cc.gatech.edu
EduTech, College of Computing, Georgia Tech, Atlanta, GA 30332-0280
http://www.prism.gatech.edu/~dh91/