|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w
use IO::Socket;
use strict;
if($ARGV[0] and $ARGV[1])
{
my $remote_host = $ARGV[0];
my $remote_port = $ARGV[1];
my $socket = IO::Socket::INET->new(PeerAddr => $remote_host,
PeerPort => $remote_port,
Proto => "tcp",
Type => SOCK_STREAM)
or die "Couln't connect to $remote_host:$remote_port: $@\n";
print $socket "1\n";
#sleep(2);
print $socket "2\n";
my $answer = <$socket>;
print "Receiving: $answer\n";
close ($socket);
#sleep(5);
}
else
{
print "Sorry you have to tell the client the IPadress and Portadress of the server!-> e.g: perl client.pl 194.94.217.81 9999\n";
}
Couln't connect to 217.85.3.211:9999: IO::Socket::INET: connect: Unknown error
|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |