Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: socket periodically loses data

by jhanna (Scribe)
on Feb 13, 2003 at 23:45 UTC ( #235136=note: print w/replies, xml ) Need Help??


in reply to Re: socket periodically loses data
in thread socket periodically loses data

Probably nobody cares, but this was the fix:
$buf=''; if($fh->sysread($buf,4096)>0) { d(2); $this=$Con{$fh}; $buf=$this->{_}.$buf; $bn=$lbn=-1; while(($bn=index($buf,"\n",$bn+1)) >= 0) { $s=substr($buf,$lbn+1,$bn-$lbn); #print DEBUG "doing <$2>\n" if $DEBUG; ${$Con{$fh}}{getline}($fh,$s); last unless $Con{$fh}; # it's possible that the connection can b +e deleted while there's still something in the buffer $lbn=$bn; } d(3); if($Con{$fh}) { ($this->{_})=substr($buf,$lbn+1); if(length($this->{_}) > 10000) { d(4); ${$Con{$fh}}{getline}($fh,$this->{_}); ($this->{_})=''; } } } else { d(5); done($fh); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://235136]
help
Chatterbox?
[choroba]: my best run so far
[erix]: I think they build a portaging installation for yachts here not so long ago - lemme google it
[erix]: choroba ah, you should have sprinted 7 s off that :)
[erix]: (but then there's always a next (im)possible goal)
Corion avoids running by starting on time
[choroba]: my phone showed me 1 hour 10 km which was my goal, it changed a bit after uploading to the website
[erix]: choroba I believe you ;)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2017-05-24 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?