|
Posted by xhoster on October 28, 2008, 6:28 pm
Please log in for more thread options
tobyboy@astroboymail.com wrote:
> Hello,
>
> I would like to implement a Perl script which receives data from 2
> clients via a socket connection and prints the result to standard out.
Which one would you prefer help on, this one or the other thread you
started on a similar topic?
...
> my $client1 = setupClient($port_client1);
> my $client2 = setupClient($port_client2);
...
> sub readClient {
> my $client = shift;
*^*
> my $name = shift;
> while (1)
> {
> read ($client1, my $buf, 1);
*^*
You are reading from $client1, a handle inherited from
the outer scope. So of course you don't find the stuff from
$client2. You should read from $client.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
|