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

Re: [MacPerl] IO::Socket::APPLETALK



Chris Nandor wrote on Mon, 24 Nov 1997 22:14:13 -0500:

>Just add the text below to :lib:IO:Socket.pm (just before the text: "=head1
>SEE ALSO\n\nL<Socket>, L<IO::Handle>") and run the script below that on two
>machines.
>
>Please let me know if it works or not, and any comments you have.

It works perfectly and I am very impressed indeed with your new AppleTalk
class for IO::Socket, which Not the easiest of modules to tinker with.
However running the test program, which works exactly as intended, has
thrown up an oddity.

The oddity is this. If the name of the service (the Object) has fewer than
7 characters the connection fails. This seems not to be due to IO::Socket
for the same thing occurs with the following scripts:

Server:

        socket(LS,16, 1, 0);
        bind(LS, $p_addr);
        listen(LS, 1);
        accept(NS, LS);
        print NS "Hello there, can you hear me?\n";
        close NS;

Client:

        socket(CS,16, 1, 0);
        connect(CS, $p_addr) or die "connect: $!\n";
        while(<CS>) {print}

where in both cases $p_addr is defined as:

        use Socket;
        $p-addr = $p_addr = pack_sockaddr_atlk_sym('Norfolk', 'x', 'y');

Here, "Norfolk" (with seven letters) works as a service name, but
six-letter "Booton" (where I live) doesn't unless you give it an extra 'o'
or something. So is 'Socket.pm' the culprit, or is it some Macish thing to
do with AppleTalk itself?

I had a look at the version of pack_sockaddr_atlk_sym() in GUSI.ph, to see
if shed any light on the matter, but it seems to be a completely different
animal requiring four parameters (family, service, type and zone). I
couldn't make it work. Is the GUSI.ph version still valid?

To complete the story, the conversations took place between a PPC running
MacOS 8 and a 68K Powerbook running MacOS 7.5.1. Both have MacPerl 5.1.5r4.

Alan Fry




***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch