Quote:
Originally posted by manny_er
The result is still the same, connection refused.
I have tried to check for ipchains and created a rule to accept from port on_tweety and still yield the same result.
Regards
|
Ok, try the following small perl program which opens a
socket and waits for incoming messages.
You start the program on one terminal and on the
other terminal you can use telnet to connect to this
socket, i.e.:
telnet localhost 14001
Then you can enter strings which should be printed
to stdout by the Perl TCP server program.
If you get the "connection refused" error, something is
wrong with your network connection.
If this work, you should call IFMX tech support because
there seems to be something wrong with informix.
************************************************** *************************
#!/usr/bin/perl -w
use strict;
use IO:

ocket;
my $server = undef;
my $client = undef;
my $portnum = 14001;
# -----------------
# create the socket
# -----------------
$server = IO:

ocket::INET->new(LocalPort => $portnum,
Type => SOCK_STREAM,
Reuse => 1,
Listen => SOMAXCONN)
|| die "Could not start TCP-Server on Port [$portnum], Error [$@]\n";
print "Server listening on port [$portnum]\n";
# --------------------------
# wait for incoming requests
# and echo them to stdout
# --------------------------
while ($client = $server->accept())
{
while (<$client>)
{
print;
}
}
************************************************** *************************