Kipp, James wrote: > the server is a Intel P3, same as the client. Little endian. I agree, > it shouldn't work, but it does. here is the code: > -- > $port = 6668; > $template = 'S n C4 x8'; > $| = 1; > socket(MY_SOCKET, AF_INET, SOCK_STREAM, 0) || die "Socket: $!\n"; > > $addr = (gethostbyname("10.1.101.12"))[4]; > $paddr = pack($template,AF_INET,$port,$addr);
If you dump out $paddr right here, you'll see that the address portion is all zeros, so you're really binding to INADDR_ANY and not to the specific address. However, the AF_INET is still out of place on little-endian, so I can't figure out why it isn't barfing on that... > bind(MY_SOCKET, $paddr) || die "$0: Cannot bind .. $!\n"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]