Thread Socket receive-Frage (35 answers)
Opened by H3llGhost at 2008-06-05 17:32

H3llGhost
 2008-06-05 17:58
#110780 #110780
User since
2007-10-14
60 Artikel
BenutzerIn
[default_avatar]
Habe es nun so angewandt:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
        while ($timeout % 60 == 0)
        {
                print "hier";
                if(IO::Select->new($s_socket)->can_read(2)) {  # 2 second timeout
                        while (my $rc = $s_socket->recv($s_output, 1024) ) {
                        $buffer .= $s_output;
                        }
                        print $buffer;
                        $timeout = 0;
                  # $s_socket->recv($s_output, 1024);
                  # $timeout = 0;
                  # print $s_output;
                } else {
                  $timeout++;
                }       
                print $timeout;
        }


Geht aber leider nicht ...
Ich habe da wohl eine Sache reingepackt was nicht sinnvoll ist oder?
Ich habe auch noch nicht ganz den Sinn der $timeout-Schleife verstanden.

View full thread Socket receive-Frage