in reply to (OT) Webserver settings
You have to somehow configure your server to listen on the ip of the server, not localhost.
A quick testing shows that, it will not work otherwise, although you can access from localhost.
server.pl
use IO::Socket::INET; my $s = IO::Socket::INET->new(Proto => "tcp", LocalAddr => $ARGV[0], L +ocalPort => 8080, Listen => 10) || die "failed"; $s->accept(); print "accepted\n";
client.pl
use IO::Socket::INET; my $c = IO::Socket::INET->new(Proto => "tcp", PeerAddr => $ARGV[0], Pe +erPort => 8080) ||die "failed";
Say the name of your computer is Blah. Then:
| perl -w server.pl localhost | perl -w server.pl Blah | |
| perl -w client.pl localhost | Works | Doesn't work |
| perl -w client.pl Blah | Doesn't Work | Works |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (OT) Webserver settings
by Anonymous Monk on Sep 06, 2005 at 04:38 UTC |