Thread Socket Binary übertragung (21 answers)
Opened by tuxilein at 2006-01-30 12:13

tuxilein
 2006-02-02 12:36
#37083 #37083
User since
2006-01-27
19 Artikel
BenutzerIn
[default_avatar]
recv:
Code (perl): (dl )
1
2
3
4
5
6
7
8
use constant MAXLEN => 1500;
.....
my $mesg';
my $buff;
while(my $read = $self->{csocket}->recv($buff, MAXLEN)) {
    $mesg.= $buff;
    last if( $read < MAXLEN );
}


read:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
use constant MAXLEN => 1500;
......
my $mesg';
my $buff;
my $conn = $self->{csocket};
while( my $read = read( $conn, $buff, MAXLEN ) ) {
    $mesg.= $buff;
    last if( $read < MAXLEN );
}
\n\n

<!--EDIT|tuxilein|1138876704-->

View full thread Socket Binary übertragung