PhillyR has asked for the wisdom of the Perl Monks concerning the following question:
sub stream1 { my ($lstream1) = @_; #socket data comes in on my $buf1; #buffer receiving stream if($lstream1->connected) { while(defined($buf1=<$lstream1>)) { #PROBLEM foreach my $fn (@stream1_clients) { #all connected clients open my $fh, ">&=$fn" or warn $! and die; #open socket to cli +ent binmode($fh, ":raw"); #thought this solved win/unix problems print $fh $buf1; } $|++ } } my $stream_ip = $lstream1->peerhost; print "* Stream 1 [$stream_ip:$stream1_prt] disconnected\n"; close($lstream1); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Remove extra carriage return (0D) on socket communications
by roboticus (Chancellor) on Nov 11, 2011 at 15:56 UTC | |
Re: Remove extra carriage return (0D) on socket communications
by Marshall (Canon) on Nov 11, 2011 at 23:32 UTC | |
by BrowserUk (Patriarch) on Nov 12, 2011 at 01:01 UTC | |
Re: Remove extra carriage return (0D) on socket communications
by Anonymous Monk on Nov 11, 2011 at 15:55 UTC | |
by PhillyR (Acolyte) on Nov 11, 2011 at 16:59 UTC | |
Re: Remove extra carriage return (0D) on socket communications
by johnny_carlos (Scribe) on Nov 11, 2011 at 16:30 UTC | |
by PhillyR (Acolyte) on Nov 11, 2011 at 17:06 UTC | |
by johnny_carlos (Scribe) on Nov 11, 2011 at 19:09 UTC |