sub openDATASOURCE{ print DEBUGFILE "Entering sub openDATASOURCE\n" if ($DEBUG); my $socketInfo=$ipPort{$socketName}; my($remote_host, $remote_port)=split(/ /, $socketInfo); if ($usingSocket) { $DATASOURCE = new IO::Socket::INET->new(PeerAddr => $remote_host, PeerPort => $remote_port, Proto => "tcp", Type => SOCK_STREAM) or $DATASOURCE=0; if ($DATASOURCE) { $return=1; $DATASOURCE->autoflush(1); #Make the IO hot -- disable buffering print LOGFILE "$sysDate: IO: Connected to $remote_host $remote_port\n"; &updateSocketStatus("$$", "1"); } else { $return=0; print LOGFILE "$sysDate: IO: Cannot open datasource: $@\n"; } } return $return; if (!($usingSocket)) { open (DATASOURCE, "<$namedPipe") or die "Couldn't open $namedPipe: $!\n"; } }