Microsoft
Software
Hardware
Network
Question : What am i doin wrong
sub Connect
{
print "Connecting to $host on $port...\n";
my $sock = new IO::Socket::INET( PeerAddr => 'C:\Program Files\Spirent Communications\SimPLEX\sim
plex.exe',
PeerPort => '15650',
Proto => 'tcp' );
die "Error: Could not create socket - $!\n" unless defined( $sock );
$sock->autoflush( 1 );
print "Sending $command command to $host on $port...\n";
$sock->send($command);
while (my $buffer = <$sock>) {
print "Server data:\n";;
print "$buffer\n";
}
$sock->close;
die "Error: Could not fork process - $!\n" unless defined( my $pid = fork() );
if( $pid ) {
while( my $buffer = <$sock> ) {
print "Server data:\n";;
print "$buffer\n";
}
close( $sock );
kill( "TERM", $pid );
} else {
print "Sending $command command to $host on $port...\n";
$sock->send( $command );
}
}
it doesnt connect
Answer : What am i doin wrong
First of all, PeerAddr should be ip address or host name of server, that listen port 15650, not path to program, like
my $sock = new IO::Socket::INET( PeerAddr => '192.168.1.1', PeerPort => '15650', Proto => 'tcp' );
Random Solutions
.asp view image
Access 2007 Runtime "A potential Security Concern has been identified"
Highlight Row Based On Column Value
Access VBA command to list Word docs for merging
advance image editing via the web
Can you print a booklet style layout using the front and back of a piece of paper (226 pages) that when folded binded actually line the pages properly
onmouse over pop up navigation button
Corsair SSDs not working in my Dell R710 with PERC 6i RAID controller
Automatic MS SQL backup and save it in a remote location
What tool do you use to manage 100+ oracle databases